Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communication with an isntrument

I have an instrument that does not come with labview drivers that i have been able to communicate with via hyperterminal.  i am trying to do the same in labview, I have the instrument's required port settings as well as a list of commands that may be sent to the instrument.  I have configured labview with the port settings and am using an example program (Basic Serial Write and Read) that came with the labview package.  For some reason the messages I send to the instrument through labview are not received.  I dont know if this is a syntax problem or what???  Any ideas?
0 Kudos
Message 1 of 5
(3,929 Views)
It would help if you mentioned the instrument and provided details on exactly what you are sending. Are you sending a termination character? Did you notice the \r\n in the serial example? Those are control codes for a Carriage Return and a Line Feed. You should probably include them with what you are sending.
0 Kudos
Message 2 of 5
(3,925 Views)
wow, i was only putting in either the \r or the \n, not both, when is one necessary as opposed to the other or are they always both necessary.  my instrument is a thermo orion ph meter, some codes im sending are.
rem - establish connection
stand - standby mode
disp - display reading
mode -  change mode
etc etc etc

how do the \r and \n affect sending multiple commands at once?

THANKS!!!!
0 Kudos
Message 3 of 5
(3,925 Views)

Whether to include one or both (or not at all) is up to the make of the instrument. That type of information should be in the progamming manual.

Whether you have to append the control codes after each command is also up to the vendor. What you could try is Hyperterminal and just type a series of commands and not hit the enter key until the last command. If it works, then you can send multiple commands with a single CR/LF. If it doesn't, then you will have to append to each one. One quick way is to create a string array and wire it into a for loop with the VISA Write. Put a concantanate string inside the loop with the constants from the string palette.

Message Edited by Dennis Knutson on 07-03-2007 01:16 PM

0 Kudos
Message 4 of 5
(3,919 Views)

I am using the same instrument (Thermo Orion pH) but haven't even established connectivity with Hyperterminal.  I am wondering how you send commands with Hyperterminal.  Do you have to send a text file?  Also, how do you know if a command is received?  Will hyperterminal display the output from the instrument?

Thanks for listing those commands, also.  They are not in my manual and when I tried to contact Thermo, I received little help.    

0 Kudos
Message 5 of 5
(3,861 Views)