2024-08-05
A terminal program can be used to visualize the commands and data sent between CAN232 and a PC. An excellent candidate is HTerm, which is free software and available both on Windows and Linux platforms. It does not require installation, on Windows just use the .exe contained in the .zip file (download HTerm here).
Connect the RS232 side of the CAN232 to a RS232 port of your PC. Use a straight connection, not a null-modem cable.
Apply power (12 VDC recommended) to the CAN232: +Vin goes to pin 9 and GND is at pin 3 of the CAN connector.
Once power is applied, the LEDs in the CAN232 should blink 3 times to indicate a baudrate setting of 57600 Baud. If the number of light pulses is different from 3 then a different baudrate has been selected (please refer to the product manual for details).
The current consumption should be in the range of 60 mA (at 12 V, no bus connection).
Check settings in HTerm:
On the input line (lower part of the HTerm window) type N and press enter (which appends a <CR> character). Check the response from the adapter, it should look like this:
The adapter's response starts with the command N, followed by the serial number of the unit (B678 in this example) and ends with a <CR> character.
Next, try the V command and see the response which gives version information (currently, this should be V1325<CR>).
If all worked properly up to this point, the CAN232 seems to be in a sound condition.
Please note: For transmitting CAN messages, at least two CAN nodes need to be connected to the CAN bus. We will use two CAN232 adapters for this purpose.
Connect both units to the CAN bus and use two terminal windows to communicate with these units. Apply the following commands on both adapters:
Now, when you transmit a message from the first unit:
you should see the same message arriving in the terminal window of the other unit.
If this is the case, all the basic checks have been performed properly.
Some settings of the CAN232 are stored permanently. These "non-volatile" settings survive a power cycle. If you intend to re-initialize a CAN232 adapter and reestablish it's factory defaults, please follow these steps:
Most importantly, the desired baud rate is saved this way. As mentioned above, 3 LED blinks at startup mean 57600 Baud. To restore this standard baudrate you need to connect to the CAN232 with the baudrate currently active and send the command U2<CR>. Then change back the terminal's baudrate to 57600.
The other permanent settings of the adapter can be restored to default values by applying these commands:
The adapter always returns a <CR> to indicate the proper execution of the command.
Last but not least, the Q command setting may require a reset as well. To do this, a channel needs to be open. The following sequence should be applied:
Now, after the next power-up start, this adapter will expose the same behaviour as a new unit.