from the Automation List department...
HP VEE and Modbus
Software, including programming, OS issues, etc. topic
Posted by Joanne Cronin on 6 November, 2001 - 2:53 pm
All I want to do is send some simple commands to a temperature controller via a RS232 port (9 pin) and read the replies. However, so far, this has eluded me. I'm probably just missing something simple. I'm using HP VEE, which provides a direct I/O communication box to the port, and Modbus protocol. Can anyone advise?


Posted by RIcardo Pabon on 8 November, 2001 - 4:45 pm
Check the cable. Normally You must use a null modem cable (shorting the terminals CTS RTS in each side ) and crossing the TX and RX signal.

If the cable is ok, check the setting of bits (data bits, parity, stop bits). Must be the same in your PC and the controller.

Regards

Ricardo Pabon


Posted by Nilesh Pradhan on 8 November, 2001 - 5:10 pm
I have had a lot of tough times with communication to some standard controllers.
I would advise you to go through the following
1) Check the wiring first. Check that you have
all the comm cables right. I had a BAD time debugging the fault when
I used a null modem cable once.

2) A simple check is to connect the RX and TX
together, and see if the bits you sent were indeed received back. If it works, then you have isolated the problem to the temp. controller.

3) Does your temp. controller come with its own comm software ? Try interfacing it with the software. It definitely will be debugged more than your custom software. This way you make sure that the temp. controller communicates

4) If it does, then you have isolated the problem to your software. Check the protocol once more.
Do some sample checksum calculations and see if you generate the same bits.

5) If everything is still fine , but you can't communicate then, it could be a bad controller.
But you have to isolate the problem first. Maybe we can talk as to how to solve the problem when you do so. I have handled a lot of RS 232 comm problems, and I don't claim that things will work the first time.

-Nilesh Pradhan
TEXAS INSTRUMENTS INC.
USA


Posted by Christopher Williams on 8 November, 2001 - 5:11 pm
Aloha;

Check out http://members.tripod.com/~mbserver/ I've used Ricardo Saat's mbserver (an activeX-COM server) that seems pretty stable. It's free! Alper celik has an example written in Delphi with source code at the bottom of the page. If you use Alper's compiled example you can read inputs or write coils or write registers or read registers through a serial port. I've got a PC hooked up to a 1.5 MW generator on the big island of Hawaii -works great.


Posted by Radisa Cvetkovic on 9 November, 2001 - 1:04 pm
I tried to communicate to Modicon PLC over the HP VEE using Modbus protocol, too. I couldn't make it...
I solved my problem using Modicon DDE server. That worked very easy.


Posted by Raoul Huisman on 8 November, 2001 - 5:09 pm
Hi
Why are you using the ModBus protocol ?

Within HP-Vee you must set the communication parameters. Are the settings correct (baudrate etc.). Furthermore the handshaking is important (RTS/CTS, DSR/DTR).

WHen you are using ModBus the supported function codes are important. Does the temperature controller support all the ModBus function codes. Who is the Master ?

Best regards
Raoul

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2010 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
All science is either physics or stamp collecting.
-- E. Rutherford