Communication with 920i Controller

P

Thread Starter

Paola Pástor

Hello.
I am working with a 920i controller and I hope you can give me some assistance. I am trying to communicate the rs 485 port of the controller with the computer. I used the protocol specified in the manual. The communication was successful using hyper terminal.

Nevertheless, I need to send the commands using Visual Basic 6.0. When I tried it, I didn't get a response from the 920i. I think that the problem is that the controller does not recognize the STX of the protocol. Using hyper terminal it is typed using CONTROL-B, and in visual basic, converting decimal 2 to it ASCII. Is there anything I can try to make this work?

Please write back to [email protected]
Thank you very much.
 
Make sure you are converting to the ASCII value "2" (character 2), and not ASCII character "2" (character 50). You might be calling the wrong function. I would suggest printing the string on your screen to check that you have the right characters.

Also, does the string need a terminator (e.g. carriage return)? You might be sending a terminator from the terminal emulator and not realise it.

Also, verify the serial parameters such as baud rate, handshake, number of data bit, stop bits, etc.

Finally, make sure your string is ASCII and not Unicode (I don't recall which one MS VB 6 uses).
 
T

Todd Dietrich

Hello,
I've had pretty good success setting up communications with the 920i. There are a couple of things that you need to keep in mind. The 920i requires a termination <CR><LF>. Hyper terminal has a setting that adds the <LF> character after the <CR> character. The 920i can be set to send a response of "??" to unknown commands. If you send anything to the 920i followed by a <CR>+<LF>, you shoul get either a valid response or the "??".

hope this helps,

Todd Dietrich
Kaskaskia Valley Scale
 
Top