How to use NG-Trace with the
Modbus driver?
Valid for Modbus 2 library
version 2.6.006, and only for Modbus TCP Master application.
We assume that you have
correctly installed NG-Trace and the Fbox library according to this instruction:
www.engiby.ch/ngtrace/ngtrdnld.htm.
You have already created your Modbus application and therefore, you have an S-Fup file with the Master Link IP Fbox.
1 Open the S-Fup file with the Modbus Master Link IP Fbox. Before this Fbox,
place an Fbox Trace Buffer from the NG-Trace family. Give him the name
'Modbus'.
On the Fbox enter a free register (one single free register).
The Level option in the
NG-Trace Buffer Fbox selects the messages to be recorded as follow:
Message |
Level 1 |
Level 2 |
Level 6 |
Level 8 |
Version |
X |
X |
X |
X |
Internal Info |
X |
X |
X |
X |
Timeout Errors |
X |
X |
X |
X |
TCP Open/Close |
|
X |
X |
X |
TCP Connections |
|
X |
X |
X |
Tx/Rx Requests |
|
|
|
X |
Rejected requests |
|
|
X |
X |
Do not select a too high
level if dont want the buffer to be quickly filled with unnecessary messages.
2 In the Device folder
(CPU for PG5 1.4), create a new file with the type NG-Trace. Important:
Uncheck the option 'Linked/Build'. The NG-Trace will open.
When prompted, select 'Connect
to standard buffer'.
3 Go in the Settings
tab and enter the same start register as chosen above. Save the settings.
4 Build, load and run
your program as usual in the PG5 Project Manager. During build, you should get
these 2 messages:
NG-Trace
Buffer for Modbus created.
NG-Trace Buffer for Modbus 2 Driver found.
Only if you get these 2 messages,
the trace buffer will work.
5 - Go online with the
PG5 Project Manager.
6 - In the View tab of
the NG-Trace, press the Connect and the Start buttons.
The named columns appear
and the events are recorded. If the options are checked, the PC Date, PC Time
and PCD status are added.
Read the Help file for more explanation about
the use of NG-Trace.
Back to NG-Trace download
page.
Engiby /
23/12/2011