
DeviceMaster PNIO | UP User Guide
: 2000639 Rev. A
Project Example - 93
Project Example
4.
Click the
Modify Once
button. The tag
LastTxSeqNum
(IW104), which is the
input data of the output submodule, changes from 0 to 1 immediately. That
means the DeviceMaster has successfully transmitted the output through the
serial port.
5.
Open the DeviceMaster web page, click
Diagnostics | Serial Log
. The following
figure shows that a
(02h)EFGHI(03h)
packet has been transmitted through
Port 1. Note that the DeviceMaster appended STX 16#02 and ETX 16#03 as
configured.
If you do not see the above message in the serial log, here are some
troubleshooting tips:
•
If the expected output data is not in the serial log, make sure the value of
TxLength
tag is valid. The DeviceMaster will not transmit the output data if
the length field is invalid, that is, larger than the size of the output
submodule.
•
Make sure to increment the
TxSeqNum
tag every time. The DeviceMaster will
not transmit output data unless the sequence number changes.
•
If the expected output data is shown in the serial log, but does not seem to be
received by the serial device, then check the serial port configuration,
including RS mode, baud rate, start bits and stop bits, flow control, and
delimiters.
In a real case scenario, a better way to write output data is to define an output
buffer structure in a data block, then use a
DPWR_DAT
instruction to copy the
entire output buffer to the output address.