Labview getting data out of while loop after each iteration - labview

I want the data out of while or for loops in Stacked Sequence Structure after each iteration..
I want the data out of loops even if it is not stopped that is after each iteration.. to see the plot of data at each iteration and continue to the next loop in the same plot
somebody please help me ..
I want to send and get data from a device, the data will be plot each time.
thanks..

Write to a functional global variable inside your data acquisition loop, then read the FGV & plot it in a loop parallel to your sequence structure.

You can also use a queue to pass data between two different loops:
Notice the different waiting times on each, in the example it updates around five new points each time to graph.
It should be possible to just drag the picture into an open vi to get the code.

Related

Using VBA to scale excel graph X-axis?

I'm using a macro to generate graphs from a table such that the x-axis is a time stamp(date, time) and the y-axis is for the data at that time. So far, there is no problem getting this to work but the result is a graph that has "blank space" before and after the data(roughly 5-10 minutes before and after on a 1-hour time-frame). I have space constraints and this cuts into them so I'd like to utilize the entire plot area. Can I eliminate the blank space by extending the data to end of the plot area somehow? Any help is appreciated.
Additionally the files I need to use are for different time frames and lengths of time(ie, different length of excel rows). Is there a way to only graph the rows with content instead of a "worst-case scenario" like using A2:A100000 because I know it will never be greater than 100,000 rows?

Passing data from one Pentaho transformation to another in a job?

Fairly straightforward question I think, I just haven't been able to find a clear example. I have a very complex transformation that I'm breaking down into a job. Having never created a job before, I'm struggling to send the data from one transformation to another. I used Copy Rows to Result in the first one and Get Rows From Result in the second one, but I feel like I'm still missing something. When I used Get Rows, I had to specify the row names - there was no sort of Get Fields button. I also can't preview the data in the transformation without running the job and having it save to an Excel file. When I did that, ALL of the fields were in the output file -- instead of just the ones I'd specified in the second transformation.
I've searched through the documentation and tried Googling but I can't find a clear walkthrough just on how to smoothly move data from one transformation to another. Any responses would be appreciated even if it's just pointing me towards something I've overlooked.
Thanks!
The most commom way is to use copy rows to result at the end of one KTR and use get rows from result as the starting point for the next one. Though you really can't "see" the result while operating in the next KTR, what you can do to ease the reading is set a preview window and leave it open to see all the columns names and data.
Whoever if you want to set just a few lines of code through to the next KTR you can use Set variables as the ending step of the first KTR and capture those variables at anytime in the second using Get Variables steps. Don't forget that if you do so you need to set the variables in the parent KJB(the Job that called the first KTR) with no Default value, and the Variable scope type of the Set variables step has to be set to Valid in the parent job.
The best way is to create KTR's, run/test each. This way you can examine resulting data and then integrate all individual transformations into the final job.

Labview filling an array with data

I have code which generates an amount of data continuously and I'd like to store generated data in a 1-dimensional array.
How do I do this in LabVIEW?
Are you using the array to transfer data from your data acquisition to another location? If you know how many elements are in the array, you should first initialize the array to that size. Then you can place data in the array by using "Replace Array Subset". This way you're not continuously allocating memory. This also assumes that you're moving that data out of the array prior to the next instrument read.
In this case it is better to use while loop (if you know the exact number of data you can use For Loop as well, giving an N terminal defined number of iterations). Simply connect your generated data wire to the border of the while loop, right click it and choose Tunnel Mode:Indexing and you will get and array.

bind Data table to chart in vb

I have a project that im working on at the moment in VB.
Basically I have a Data Table in VB it populates with 4 columns and a variable number of rows, the column names are as follows;
Gear, RPM, Speed, CO2
The data table appears in datagridview correctly but that's as far as I have gotten :/
What I am trying to do is to make a line chart called mainGraph to draw a graph based on these results, I'm getting stuck when trying to populate the chart.
ANY thoughts would be really appreciated.
I am guessing you are using the ms chart controls and not some 3rd party like Telerik.
This should be usefull http://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx
Also, there is source code found at http://archive.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=4418
in short this is a way to get things displayed
mainGraph.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Line
mainGraph.Series(0).Points.DataBind(yourDataTable.DefaultView, "Speed", yourDataTable.DefaultView, "Gear")
These commands should make a line graph with Speed on your x axis, and Gear on your Y. Assigned to "Series(0)"
To add more columns, you need to add more "Series"
mainGraph.Series.Add("RPM")
Do some thinking about how you want this data displayed.
how would you like to set this graph up?
I'm assuming you would want a line graph?
What is going to be the X axis? Is there a missing column that needs to be "time" in the data table?
do you want them all on one graph/chart area?
If you would like more charts, then you need to add chart areas. A series can be assigned to a chart area.
Hopefully this helps.

Automate graph generation based on variable time

I need help creating an Excel macro.
I want to take the Excel file here and create a graph of each of the servers with time being the x axis and memory utilizaiton % being the y axis. The problem is, the number of data points for each server can be variable (sometimes the first server has x number of data points, other times it has x+2).
Can anyone help me with this?
Sure. If I'm understanding correctly, you need to create a chart where your data can grow in size. In that case you need to use a "dynamic named range" that expands as new data is added. The chart that you will end up creating is called a "dynamic chart". The dynamic range is set up using the OFFSET function which allows it to expand.
I think these videos will help you:
Excel 2010 / 2007: http://www.youtube.com/watch?v=M9hhUVljTx4
Excel other: http://www.youtube.com/watch?v=7le-m8YRP6M