I meant the control input would be Dev2/Port0/line0:7,Dev2/Port1/line0:7. That should be 16 lines. But I don't have a way to verify if that syntax would work. If Dev2/Port0_16 (or would it be 0-15?) works that's great. Like I said before, it gets really confusing as to the different ways these lines can be addressed.
Fvalenzu wrote:
The time in between pulses is not critical as a software delay (~100ms) will be fine. Right now I can do this by manually selecting the proper boolean array position and then running this vi. The question is how to do it programmatically?
As I understand, you want a 100 microsecond pulse on line 0, wait 100 msec. Then a 100 microsecond pulse on line 1, wait 100 msec, 100 microsecond on 2, etc through your 16 lines. The boolean array creates your waveform for each line. Column 0 is for line 0, column 1 is for line 1, .... Each row represents a given instant in time. So if the waveform is set up with a 100 microsecond dt, then row 0 would be the first 100 usec, row 1 would be the next.
I am going to assume that we are working with 1 100 msec period with each data point being 0.1 msec (100 usec). with a pulse on a given channel for 1 sample, then turned off for the next 999 (the math is easiest as opposed to a 1000 sample off time.) Then repeat for the next channel. So what you need to do is build a boolean array with 16 columns, and 16000 rows full of falses, then replace given elements with a true according to that pattern. You do that once at the beginning of the program and feed the results into the boolean/digital waveform conversion and ultimately into the write VI. The earliest LV version I have at home is LV8.2 so I will attach that. But it is simple code so I will attach a screenshot.
Now it is possible I got the rows vs. columns mixed up in this array as to what relates to channels vs. samples. So if that is the case, a transpose array, or just reworking the code to swap column vs. row inputs should work. Don't forget to set the sample rate and/or dt so that a single value represents 100 microseconds.
<img src="
Loading Image...
">
Edit: That constant of 100 in the loop should actually be 1000 and the 1600 outside of the loop should be 16000! I wrote the code before I reread the message and saw the 0.1 ms to 100 msec ration which is 1:1000 rather than 1:100. Hopefully this will give you the idea.Message Edited by Ravens Fan on 10-25-2007 07:46 PM
Create Boolean Array.png:
http://forums.ni.com/attachments/ni/170/280457/1/Create Boolean Array.png
Create Boolean Array.vi:
http://forums.ni.com/attachments/ni/170/280457/2/Create Boolean Array.vi