05-12-2010 12:58 PM
I have an application in which I am monitoring 28 Digital I/Os through 2 stackable WTIO-M cards. (manual attached)
I have no problem setting up and writing one command to the board with the Visa serial write function using a concatenated string with a carriage return. However, when I try to add multiple commands to the read function using a concatanated string array, I get an error. I've tried using multiple input commands at the end of each line including the ASCII end of line command.
Essentially, I need to be able to initialize all ports. Then do a simple monitoring on 27 of them for a toggle command from the board. I'm just stuck trying to write multiple commands to the 'visa serial read' function which is my first step.
Any guidance would be appreciated.
05-12-2010 01:34 PM
Unfortunately, what you are describing is not clear. You're referring to adding multiple commands to the read function, or writing multiple commands to the VISA Serial Read, which makes no sense. Do you mean write? Are you using separate addresses?
You should be aware that the EOL constant in LabVIEW generates the EOL that's specific to the operating system. On Windows this will be CR/LF. The modules you are using expect only a CR.
05-12-2010 02:58 PM
I apologize for the muddled message. I'm trying to write multiple commands to the string input of the Visa Write Function which is accesing the WTDIO-M card through the serial port.
Currently I can put in one command: such as AHM which works when I concatenate the string input with the labview carriage return constant.
However, when I try to add another command line such as ALM using the concatenate function to the Visa Write string input I can't get it to work. I've tried labview constants for spaces, end of line etc with no luck.
Maybe I'm missing a vital step but I just want to write multiple input commands into one visa write function.
05-12-2010 03:43 PM
05-12-2010 04:10 PM
05-12-2010 05:22 PM
05-13-2010 03:42 AM
11-27-2012 12:20 PM
Was this question ever resolved? I am also wondering whether the serial write will accept multiple commands. At the moment only one is being read in labview and everything after \n is ignored.
11-27-2012 12:28 PM
That is not clear at all. You say the serial write will not accept multiple commands but then you say only one is read by LabVIEW. Are you doing a write or a read? You can put as much as you want in the VISA Write. It is up to the instrument to accept multiple commands. If you are doing a read, then in order to read multi-line returns, you have to have the termination character disabled.
11-28-2012 12:28 PM