Communication with ADAM 5000 Hardware

R

Thread Starter

Ritika

I request the experts of this forum to kindly answer my query:

I have written a program in C to communicate with any external hardware using the serial port.

The program displays a black screen that is divided into Command Window and a Response Window. The command can be issued from the Command Window where the cursor is present by default. I tested the program in the following manner:

Issued a string from the Command Window and checked whether the string is received back in the Response Window correctly or not by shorting Pins 2 & 3 of the serial cable. The string was received in the Response Window correctly, hence I concluded that the command string successfully passed over the RX line and was also received back on the TX line, hence my software code is correct.

Then I prepared a cross cable (Rx connected to Tx at the other end and Tx connected to Rx at the other end) and connected two PCs thru their serial ports. I started my application on both PCs. Issued a command string from Command Window of PC1. The string was received in the Response Window of PC2. Then issued a command string from PC2 and the response was received on PC1. Hence, again I assumed my code is correctly functioning.

Having done this, I wanted to communicate with a standard ADAM5000 Data Acquisition Hardware Module. The manual & literature of ADAM 5000 specifies a set of command strings to which the ADAM will respond. I tried sending the command strings to the ADAM's RS232 Port using a standard serial cable but there was no response! I tried doing the same thing with a cross cable and still there is no response. What could I have missed?

Request experts to kindly offer some valuable tips I might be missing.

Thanks and best regards
Ritika
 
Baud rate? Stop bits? Parity? RTS/CTS handshake? Is that model of ADAM 5000 configured to receive commands on that port?
 
Ritika,

First, before using your custom software to interrogate it, I would recommend that you try to talk to the ADAM-5000 device using the ADAM-4000/5000 utility (download from Advantech).

This utility program features auto device discover, and it will help you find it (in case its device address is something different than what you expect).
 
C

curt wuollet

Many things can prevent RS232 communication. Jumpers come to mind in this case. Depending on how they set up their port, it can be really easy and non-critical to get it working or it can be really confusing and difficult. But, don't they offer software to test these? That would eliminate hardware as a cause, if their stuff works. And if the hardware works, you can investigate what they really put out on the wire. I can't count the number of foibles that have occurred describing what should be sent and received like when it wants <07><03> so you put those binary values on the wire and what it really wants is literally <07><03> (6 ascii characters) So, if you can get their test software and a datascope you can see exactly what needs to be sent. These things can be very subtle as well, like your software doing some conversion for you. The datascope cuts through all the fog.

Regards,
cww Who has made a lot of serial things work.
 
Thank you so much for a prompt reply. There is no mention of baud rate, parity etc in the ADAM module's literature. So I set it to 9600 and none which is usually the default case. Secondly, the literature clearly mentions that only three pins RX,TX and Gnd are used so I assumed that RTS/CTS are not to be used.

Moreover, we have an Application Software written for Ambient Air Monitoring Station that is currently used to read data from another ADAM 5000 unit and is successfully acquiring data over the RS232 port so I assumed that ADAM5000 can be made to talk on RS232 port.

I shall, however, recheck these parameters and try again and post a feedback for further help. Thanks.

Regards
Ritika
 
C

curt wuollet

That illustrates the point :^). Someplace along the line, the symbols I put in to illustrate were removed. Suffice it to say that you may not have the same thing in mind as the authors in describing the message. But seeing what their stuff sends should tell all. You might be able to do this by getting it working then subbing your PC running a terminal program for the Adam. Easier than a datascope.

Regards,
cww
 
R
Ritika,

First of all check your cable with a multimeter if you check the voltage between pin 5 and 2 or 5 & 3 the Tx will have a voltage 9-15 volts. Then check it's mating connector, the voltage there should appear on pin 5 and the other pin. The Rx pins will be at zero volts.

When you plug in it will be
5-----5
Tx----Rx
Rx----Tx

Note: I didn't say which pins they are on, might be the same might be different, that doesn't matter.

I find it's harder to establish comms at the higher Baud rates, if you can slow it down to say 1200 you might find it easier. Then you play around with the other settings, parity, stop bits etc until you start to see some response, usually some garbage at first as things come into line. Once you have it talking without errors at a slow speed then you can up the baud rate.

Regards,
Roy
 
Top