Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting start bit for RS-232 communication

We want to control the Pfeiffer make TPG 256A gauge controller through PC via RS-232 Port. We had written program in Visual Basic using NI component work CWSerial1,  through which we are able to send the command to the gauge controller i.e we are able to change the CONTRAST and make the sensor ON/OFF. But we are not able to receive data from the controller.We receive either '?' or '|' characher and <cr> from the controller when we try to read from the controller.
the format for data is given as follows:

1 Start bit, 8 data bits, 1 stop bit, no parity bit, no hardware handshake

where i am able to set the data bits , stop bit and other paramater but there is no way to set the start bit. i would like to know whether there is a way to set the start bit or it is not needed.
Also it would be helpful if u can send me some sample program if possible  in C or Visual Basic language to access  the  pfeiffer controller.
 
Thankx
regards
Ramchandra Chavan
 
 
0 Kudos
Message 1 of 5
(7,412 Views)
You are right that you are not able to set the startbit. And that is OK because it always is the same since 1965.

You probably have to send an endcharacter after the data. try CR and LF as two endcharacters or even better try in hyperterminal to check the communication.
Hyperterminal sends out CR and LF after each ENTER on the keyboard.

Good luck
greetings from the Netherlands
0 Kudos
Message 2 of 5
(7,409 Views)
Hello Ramchandra,

You probably have to send it a specific command before you read data.  You can look into the manual to find the command.   As mentioned, it is a good idea to test this in hyper terminal.

What development environment are you using?  (LabWindows/CVI, Visual Studio, ?)
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 3 of 5
(7,389 Views)
Why is somebody from NI not asking for usage of LabVIEW?

greetings from the Netherlands
0 Kudos
Message 4 of 5
(7,363 Views)
Thanks for the suggestions. Now i am able to read the pressure from the controller. The only problem was that we need to send the <ENQ> as a character Chr(5) and not as string  to read back the data.  Hyper terminal was a good idea to debug the problem.
 
Thanks
 
Regards
Ramchandra Chavan
 
0 Kudos
Message 5 of 5
(7,284 Views)