Command Variations:
TI Series 305 and 405 PLC’s return 5 words of network status information
when using CALL PLCREAD with cmd = 1. The following example describes
a typical way to read the status information:
Numbers in
bold
cannot be
changed
10 DIM stat%(5)
20 CALL PLCREAD(1,1,0,5,stat%(1))
This will store Last Error and Previous Error in stat%(1), Number of
Successful Communications in stat%(2), Number of Erroneous
Communications in stat%(3), Number of Retries For Header in stat%(4), and
Number of Retries for Data in stat%(5). (See your PLC manual for more
details) You must read 5 words of data any time you wish to read the
network status.
You can reset the status registers by using the CALL PLCWRITE command
with cmd = 1. You must write five words. The data can be arbitrary, since
the net result is resetting the status registers, no matter what you write. See
the example:
Numbers in bold cannot be
changed
10 DIM newstat%(5)
20 CALL PLCWRITE(1,1,0,5,newstat%(1))
(See your PLC manual for more details) You must write 5 words of data
any time you wish to reset the network status.
All other commands behave as described in previous sections.
PLC Interface Commands PLC Specific Information
71