LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is this "OK"? Lots of Serial Write.vi's !

Hello all. I had a recent post and two excellent responses about how to get a constant FALSE condition to send a command ONCE, and a constant TRUE condition to send a command ONCE. In other words, while the buttons are "idle", nothing is being sent. The attached VI works great, but look at all the Serial Write.vi's! It doesn't really bother me, but is it just seems wrong. Are all those vi's "doing something" while they sit there in the case structure? Is there a way to get ONE Serial Write vi outside of the cases? Or should I care?

background: In my other applications, the hardware has a FIFO and memory and I can concatenate lots of strings and send them to ONE Serial Write vi. In my new application, it's paramo
unt to send ONE command and stop, hence the imbedded case structure and shift register to tell that a key has been pressed. The other attached vi is an example of what works on my old hardware but not the new stuff, so you can get an idea of why the new program seems so fat.
Richard






Download All
0 Kudos
Message 1 of 4
(2,626 Views)
If you want to use a single serial write, you can programmatically build your device dependent data string. See attached.

P.S. What a great user profile name. Wish I had thought of it.
Message 2 of 4
(2,626 Views)
Isn't "Broken Arrow" also the term the military uses when they accidently break a nuke durring handling?

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 4
(2,626 Views)
Ben, I wouldn't know. But I do know, that my arrow button is broken most of the time, hence my user name 🙂
Richard






0 Kudos
Message 4 of 4
(2,626 Views)