This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
modbus [2011/11/06 21:59] jap |
modbus [2011/11/06 22:01] jap |
||
---|---|---|---|
Line 35: | Line 35: | ||
Here is a simple test software that reads given number of register values from modbus slave and prints them to ''stdout''. This application is made only to study libmodbus and test modbus interface. | Here is a simple test software that reads given number of register values from modbus slave and prints them to ''stdout''. This application is made only to study libmodbus and test modbus interface. | ||
- | Build the code with following command: | + | Build the code with the command below. In Debian, at least following packages are needed: ''build-essential, pkg-config''. |
- | cc `pkg-config --cflags --libs libmodbus` mbtest.c -o mbtest | + | $ cc `pkg-config --cflags --libs libmodbus` mbtest.c -o mbtest |
Source code of mbtest.c: | Source code of mbtest.c: |