I have done one program and when I try to run the program I see one error that says that I am putting one number data of 18 in one line that only have 8 numbers. Could you help me please to solve this problem? In the last case of the case structure I have one array of 18 and I divide the array in three different parts not to have one array of 18.
I attach the program here.
This is the message of the error.
If you are using the Digital Waveform datatype, make sure the number of lines in the digital waveform matches the number of lines in the channel. If you are using boolean data, make sure the array dimension for lines in the data matches the number of lines in the channel.
Number of Lines in Channel: 8
Number of Lines in Data: 18
Since you seem to be starting to learn LabVIEW, I would recommend that you "start small". Instead of taking a complex Example and making it more complex, try to make it as simple as possible.
You seem to be wanting to do Digital I/O, using 18 lines (which you are splitting among three Digital I/O Channels). Why don't you write a very simple routine that puts out a square wave (alternating Boolean True and False) on 1 line of Channel 0, and see that it works, and then 8 lines of Channel 0. It is not clear to me if you want to do this one point at a time, or using the timing ability of your DAQ device to output a digital Waveform (which has, say, 1000 sample points designed to be output at a specified frequency, say 1 kHz) -- you should make your sample program do this if that is what you ultimately want.
Once you have this very simple routine working, you can look at the more complex code you attached (thank you for doing that!) and fix your errors yourself.
P.S. -- the term "lines" has many meanings. Be sure you understand the meaning(s) with respect to this DAQ device and your program.
Sorry, I don't have drivers installed, so I cannot look at your code in detail. Can you at least tell us where the problem function that generates the error is located?
Nobody here has the time to go through a gigantic diagram full of race conditions. Who wrote this code?
Some glaring issues:
Most likely the control values for output 1 & 2 will get read at (A) before their value property is written (B), meaning that most code in the first sequence frame is moot.
Simplify! You can wire a numeric to case structures:
None of your value property nodes are needed.
Now get rid of those InsertIntoArray functions. When you want to make sure you always get an array of 8 elements you should use BuildArray and append an array of 8×FALSE, followed by ArraySubset to keep the length at 8 elements…
No need to initialize an array of 8×FALSE 3 times.
The loop above "VirtualBench Device" is wrong (not shown in the last image). Completely wrong…
So, I have to create one array constant of 8 elements and connect this array to the function BuildArray?
Thank you for your help!