I'm new to LabVIEW and I'm learning how to use the real-time PC to output analog voltage from the data in an array. I'm now first want to create an array. I want to make it clear for users to manipulate so my desire is: when click "RESET" button, all the numerics and the array are initialize(typically all set to "0") and when click "START" they are able to create the specific array I need. And now I meet 3 questions:
1. My current understanding is to use "Event Structure" in a "While loop" to achieve my goal. But when I start compiling and then run the VI the button can't work. when I take the code out of the "Event structure" it can run as I wish.
2. I wrote the program out of the real-time target and made it an independent vi it could run. But when I inserted it under the target category it couldn't work. Now neither opening it in my host computer nor writing a new one can't work.
3. I try to test out and put the button in a "while loop" it could be clicked but when add an "Event structure" it can't run as I wish.
Hereby are my files.
Solved! Go to Solution.
A RT target does not have a UI, so an event structure is useless.
You should eliminate all your value property nodes. There is absolutely no need for them!
Unfortunately programming such a system on an RT device is a bit more complicated.
If you're always going to be controlling it from a desktop applications (or development environment) you probably want to look at the options for inter target communication.
Here are some links you might find helpful.
In LabVIEW variables are the wires shift registers, feedback nodes etc.
Controls and indicators should be viewed as a "I/O" device to get information from the user or present info to the user.
LabVIEW is not like other programming environments. You would benefit greatly by learning a little about it before jumping in over your head.
When you come to the LabVIEW Forum, you are greated with the following:
(The bright red arrow point you to Training offerings is not present on the Forum, itself, so you might have missed these offerings).
You will quickly learn that "Data are carried by Wires", and you interact with Wires, not with conventional "variables" that you would find in text-like languages. It turns out to be a powerful visual metaphor ...
What are you going to do with the final array and why do you have the 10ms timing? Are you expected to change the numerics while the loops are running? Probably not! (You could not, even if you tried, because the event is set to lock the front panel until it completes )
Here's a comparison of two ways to create that array.
The top is based on your code... arguably, the bottom is simpler (no value properties, no sequences, etc.)
I add a waiting time because I found it couldn't produce array one-by-one. Now it can create in a sequence like 0.001, 0.002 and without a time delay it can't work at the regular interval of 0.001. I don't know why.