LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Movement control via visa write

Hello Everybody, 

I am fresh to Labview, my project here is to create 4 buttons that can write into Visa Write. I have tested my board (Arduino Mega) + APM v1.0 which the condition of (press F key, the motor will high) and (press B key, the motor will low) I have problems connecting to the Visa write, i hope you guys can help me out here.

Thanks

0 Kudos
Message 1 of 2
(1,962 Views)

What exactly is your protocol with talking to your Arduino?

 

I'm guessing that what you really want is to send the raw ASCII characters over the serial bus, not the ASCII number presented in ASCII.  So the Number to ASCII String is not the function you want.

 

In fact, I wouldn't use the keyboard input VIs.  Use an Event Structure.  You can create an event for This VI->Key Down.  That will trigger an event each time the keyboard is pressed.  From there, you can easily make your comparisons and write the value out to the serial port (use a Type Cast to change the character into a string).

 

Also, DO NOT use the abort button to stop your VI.  You should be able to stop your VI cleanly and then close out any references you opened (like the VISA session).  Add a stop button!


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(1,920 Views)