gpio.AO

Re: gpio.AO

You can connect the gpio.AO either by USB or using RS232. By default, any gpio.NET module is configured to use Modbus RTU in RS485 mode on the serial line. The USB connection is alway Modbus ASCII. Thus, the module has to be configured first when NOT using USB (PortuxG20 has no RS485). Our open-source Modbus library (TML) can be used to write a program running on PortuxG20 that interacts with the gpio.AO.

The library including some examples can be downloaded here:
http://www.taskit.de/tl_files/cust/dl/tml-1.02.zip

There is a short English description and a more detailed German manual (may be applicable) for the gpio.AO.
http://www.taskit.de/tl_files/cust/dl/gpio.AO_short_pre_EN.pdf
http://www.taskit.de/tl_files/cust/dl/gpio-AO_20140127.pdf

The library above contains a tool (simple-client) already compiled for Windows and Linux (as well as for ARM-Linux) that can be used to configure the gpio.AO over USB.
For Linux assuming /dev/ttyACM0 to be the device file used by your AO module use:

./simple-client /dev/ttyACM0

You enter a shell which provides Modbus commands to be send to any Modbus device. Since over USB the Modbus format is always ASCII, type:

set-mode ascii

You can get a list of commands by typing:

help

The default address of your gpio.AO is 1 after shipping. Use this as Modbus device address (note: all write commands can also be broadcast commands; used device address 0 for that).
For configuration the EEPROM-located registers need to be written (starting at 0x1000). Configure your card for RS232 according to the manual.

On Windows, the procedure is similar (run simple-client.exe instead). However, a driver might be required (http://www.taskit.de/tl_files/cust/dl/gpio.NET.inf). After plugging the gpio.AO (USB) a new COM device appears. Assuming this device to be COM10, use:

simple-client.exe //./COM10

The configuration process can be skipped when interfacing the gpio.AO via USB.

Syndicate content