06-14-2007 06:44 AM
Hello
I need to read/write from a pressure control (from GDS instruments) that has a SERIAL port (RS-232).
I’m using LABVIEW 7.1, and Windows XP Professional with SP2.
With the help of a LABView example named "Basic
serial write and read.vi", I have done successfully the VISA WRITE
function. I have sent a string line to the pressure control and it reacted
positively. That functionality is working ok.
However, I can't do the Visa READ. The string line that it supposed to read appears blank.
It doesn’t recognize anything.
What could be the problem? If I have configured the input parameters (baud
rate, data bits, parity,...) in a way that it can do the Write, why doesn't LABView
can also read it?
Baud Rate: 4800 (The pressure control doen't suport 9600)
Data bits: 8
Parity: Odd
Stop Bits: 2
Flow control: none
06-14-2007 07:13 AM
Are you checking the number of bytes to read at the port and wiring that value into the Read from Serial Port?
Things to look at:
1. Using a sw like Hyperterminal, are you able to write and read (to/from) the instrument.
2. If yes to #1, you should send a command (Write) to the serial port. Then you should read how many bytes are available at the port to be read. Wire this value to the read serial port. If the value is not wired or a value of zero is wired, then it won't read anything.
3. If you already have a value like #2, then is there a small delay between the writing and the reading?
4. Do you get any error or timeout messages? Make sure the error cluster is wired to an indicator or a simple error handler.
06-18-2007 05:02 AM
06-18-2007 04:34 PM
I should probably first ask what Operating System are you using?
Also, have you been able to communicate with the instrument using any 3rd party serial communication software?
The first step would be to have basic communication to/ from the instrument or any serial device. So no need to change any settings for now.
Just curious... when you mention sserial communication to your calculator, do you mean from your PC?
RayR
06-19-2007 04:48 AM
Joe: I should probably first ask what Operating System are you using?
Ricardo: Windows XP professional
Joe: Also, have you been able to communicate with the instrument using any 3rd party serial communication software?
Ricardo: i think i don't understand the question very well. 3rd party serial communication software? Give me an exampleYou (Joe) suggested the use of HYPERTERMINAL to check the conection bettewn the computer and the hardware
My problem is that i don't understant the functioning of HYPERTERMINAL
Once i make the conection with HYPERTERMINAL should anything be show on the monitor PC
I don't need to change the COM settings (baud rate, parity,...)
Joe: The first step would be to have basic communication to/ from the instrument or any serial device. So no need to change any settings for now.
Joe: Just curious... when you mention sserial communication to your calculator, do you mean from your PC?
Ricardo: Yes. Connect the calculator to the PC by a serial cableRicardos
06-19-2007 07:11 AM - edited 06-19-2007 07:11 AM
Message Edited by JoeLabView on 06-19-2007 08:12 AM
06-19-2007 07:20 AM - edited 06-19-2007 07:20 AM
When running HyperTerminal for the 1st time, you need to set it up. See pictures below:
Select your Country (or leave USA only if you were to use the phone feature)
Just click OK for below:
Give a usefule name a select an icon. Typically, the first one will do (red phone). You can recall your settings later by selecting the name you give here to open HyperTerminal later.. This is useful.
Message Edited by JoeLabView on 06-19-2007 08:24 AM
06-19-2007 07:25 AM - edited 06-19-2007 07:25 AM
You should be ready to go. Once you have a device connected to the port, you should be able to type something (command) in the window similar to the one below.
Usually, when first connecting / turning on a device, some sort of message appears saying the model designation of the device, etc..
Message Edited by JoeLabView on 06-19-2007 08:30 AM
06-19-2007 07:36 AM - edited 06-19-2007 07:36 AM
If communications do not work. You can change settings in the properties menu:
You first need to disconnect..
Then open the properties
Message Edited by JoeLabView on 06-19-2007 08:37 AM
06-19-2007 07:38 AM - edited 06-19-2007 07:38 AM
Your PC may have multiple serial ports. Or porst assigned differently than what is shown here. The best location to determine this is in your control panel (next post).
It is unlikely that you need to change the 2nd Tab (settings) for now..
Message Edited by JoeLabView on 06-19-2007 08:41 AM