03-26-2009 07:49 AM
Solved! Go to Solution.
03-27-2009 02:00 PM - edited 03-27-2009 02:09 PM
Hello Bassinbc.
I see that you have duplicated the post. In this case it is ok because it is better suited in this forum --> LabVIEW however please refrain from doing this in the future as it help us stay on top of things on our end.
As for your problem I ran you program and I can see that you have simple mistake in your block diagram. You have specified that both indices be 0. Dopuble check this and I will work on this and see if I can reproduce this issue and re-post soon.
03-27-2009 03:07 PM
After looking into your issue a little further Please conduct the following, on your Create Channel VI there is a terminal named: "Line Grouping". Create a Constant/Control off of this terminal and select "one Channel for each line" from the drop down Enum. The Default is "one channel for all lines". This will ensure that the data is recorded on a channel basis and not a port basis. This will therefore create an array of waveform with index 0 for channel 0 and index 1 as channel 1. Instead of how you had it before where index zero related to port 0.
See the attached VI for details on this.
Thank you
03-31-2009 03:18 PM
03-31-2009 03:28 PM
You have 1 major problem and 2 minor problems with your dequeue loop.
Major Problem:
You are taking a single queue and trying dequeue from it multiple times. Each dequeue takes an item off the stack. If nothing is there for the next dequeue, then it waits until something is. Thus it takes 8 items to show up in the queue before the loop gets a chance to iterate once. Only 1 dequeue per loop. Split the wire that comes out of the dequeue and send it to each of the other pieces of code.
Minor problems.
The Index Digital Waveform is an unneeded subVI. It's non-reentrant which means each instance has to wait until the others are done. All it does is index out a single waveform from the 1-D waveform array. Use the Index Array and stretch the bottom of the node downwards until you get 8 outputs.
The Build Digital Waveform is an unneeded subVI. All you are doing is taking a digital waveform and building it into itself.
03-31-2009 03:52 PM
I took your advice and things did get faster. One thing left would be to get each line (frequency) to show up on the chart as a number. That is what the build array is suppose to do. This doesn't seem to be working. I should have up to eight plots of a numeric number.
03-31-2009 04:11 PM
Take a look at the context help of the waveform chart. If you send it a 1-D array, you only get a single plot.
To get multiple plots, you need to send it a 2-D array. You'll have to either use a Build array to take the 1-D to a 2-D, or a build array on each scalar wire to take them from a scalar to a 1-D, and 8 of those get built into a 2-D. ( you could also do the former and use transpose array.) I'm not sure which is correct for your situation. You'll just need to play with the arrays until you get the 2-D array built just right.
It looks like you have LV 8.6? I would recommend doing an Edit --> Clean Block Diagram on your code. It will clean up the diagram nicely.
04-01-2009 07:22 AM
04-01-2009 12:40 PM
bassinbc wrote:
I am using 8.6. The attached program is a 1d array with each anlaolg input stripped out. The chart displays each channel separately. I don't see why you have to send a chart a 2-D array.
Does what you have work now?
The code you posted this time is a lot more complicated than what you posted before, and your chart is set up differently. Before you just had a Waveform chart of double type that you were sending in a 1-D array of of doubles. The chart treats that as multiple points on a single plot.
In the VI you just attached, you are sending a 1-D array of waveforms which is mulitiple waveforms (each element of the 1-D array) with 1 or more pts per waveform (the Y array inside the waveform data type.) Interestingly enough, the context help for the waveform chart doesn't mention a 1-D array of waveforms, just a waveform datatype. However, the charts.vi that can be found in the example finder does show this and other options. I would recommend opening the Charts.VI example to see all the variations.
04-02-2009 07:17 AM - edited 04-02-2009 07:23 AM