LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Port Variable

I currently have a set-up where I send a character down an RS-232 cable using a simple VISA interface and my hardware interprets the command and runs whatever I have programmed into it.  One command is causing me particular problems;

case 'D':
IACmotor_pos = x;
move_IACmotor();
break;

Obviously, when a 'D' is sent down down the line, the case statement is run.

The problem I am having is that I want to send the variable 'x'  too.  Can this be done?
0 Kudos
Message 1 of 5
(3,096 Views)
Are you using Labview?  If not, maybe you want the Labwindows forum.
0 Kudos
Message 2 of 5
(3,079 Views)
LabView 7.1.1
0 Kudos
Message 3 of 5
(3,072 Views)
Then the question is what have you done in Labview so far?  Do you have a VI you can post?  The piece of code you posted in your original message is not Labview.
0 Kudos
Message 4 of 5
(3,053 Views)
How does the end device get the parameter "x"? When does the device begin executing the command? Does "x" need to be sent first?

It sounds to me as though the communication protocol with the device is not clear or not implemented the way you think it is.

With a clear description of the communication protocol it should be possible to implement the LV end without too much trouble. Without the protocol it is a guessign game.

Lynn
0 Kudos
Message 5 of 5
(3,047 Views)