User`s guide
characters, put a backslash and the three digit code. For example, if you needed
to send it “Give me data” and a carriage return, you would put:
Give me data\013
13 is the ASCII code for carriage return, so \013 sends a carriage return at the
end. Other common codes are \010 for a line feed (LF), and \009 for tab. If you
have no idea what to send, start with a carriage return: \013. No matter what
you send, you should see what your output appear in the monitor error preceded
by “Tx:”, and hopefully your device’s response. If you don’t see what you
outputted and the Tx, then the connection failed. With serial RS232/422/485
comm ports, this usually means another piece of software is using the port or you
specified a non-existant port and you probably got an alert already indicating this.
With Ethernet, this means a connection could not be established, which means
either the IP address was wrong, or inaccessible, or the IP port was incorrect. Or
you just forgot to turn the device on. Either way, you should keep the monitor
window open and tweak your settings until you get it transmitting.
If you get Tx: and your output string but no response, then things are a little
better off. First, check your command and make sure you have it properly
formatted. Many devices don’t respond to invalid commands. Second, the
communications settings could still be off. With serial, this typically occurs when
you have the wrong baud or other setting. With Ethernet, it could be that you are
simply communicating with the wrong device because you put the wrong IP, or
your device has multiple Ethernet ports (some Ethernet encapsulation devices
have this), and you connected to the wrong one. Or, perhaps while you weren’t
looking your cat ate the cable. Again, leave the monitor window open, tweak your
settings, check your cable, and check the device’s manual. Until you get a
response, there is no point in moving forward with the rest of this guide.
Polled data with a complex protocol:
If your device uses a complex protocol, such as Modbus, you probably don’t know
off hand what a proper message is. If you do, perhaps you’d like a job with
AzeoTech? If not, fortunately we do work for AzeoTech and so here are a couple
example commands that might work. You could also simply jump ahead to the
section on prebuilt protocols, leaving the monitor window open.
ModbusRTU: assuming your device is at Modbus ID 1, to read the first holding
register do:
\001\003\000\000\000\001\132\010
ModbusTCP: you can actually send 6 characters and the device will likely echo it
back. But here is the same command as the above example for RTU using
ModbusTCP:
\000\000\000\000\000\006\001\003\000\000\000\001
Allen Bradley: assuming your device has an ID of 1 in CRC mode, to read N7:0
do:
\016\002\001\000\015\000\042\000\162\002\007\137\000\000\016\003\136\065
Mitsubishi FX serial: to read T0, do:
\0020080002\0035D