Sequence When Training a Code (COMMAND = W#16#0002)
To allow the FB to trigger training a code, the Connect > Integrate > Control
parameter must either have the value "DP" or the value "PNIO" on the processing
unit.
The job can only be sent when VS 130-2 is not in ERROR mode (refer to the mode
table following the parameter table).
When the job is triggered, the parameters DONE and ERROR change to the value
FALSE. The ACTIVE parameter changes to the value TRUE.
The block trains the code specified by the PARAM1 parameter.
Note
In exceptional cases, training a code can take up to 35 seconds.
The value of PARAM1 cannot be changed before the job is completed.
It then queries the code currently selected on the VS 130-2 and outputs this in the
CODE_OUT parameter.
If the currently selected code matches the code specified in the PARAM1
parameter, the ACTIVE parameter has the value FALSE and the DONE parameter
the value TRUE.
If the currently selected code does not match the code specified in the PARAM1
parameter, the ACTIVE parameter has the value FALSE and the ERROR
parameter the value TRUE. The ERRCODE parameter contains an appropriate
error message.
There is also a check to determine if the training has been blocked by a "Service"
or "User1" user logged on via the setup support who has taken control of the
VS 130-2 and if the training has been successful. If an error is detected, the
ACTIVE parameter changes to the value FALSE and the ERROR parameter
changes to the value TRUE. The ERRCODE parameter contains an appropriate
error message.
If you attempt to cancel during an ongoing training job, the ERRCODE parameter
takes the value DW#16#00000002 but the job is processed until the end.
Note
The following parameters must be set to PROFIBUS DP or PROFINET IO to
process the job:
Output the result string
•
Port for the DISA, SEL0 to SEL3, TRN, RES, IN_OP, TRD, RDY signals
•
Vision Sensor SIMATIC VS 130-2/VS 130-2vcr
A5E00475759-01
Process Interface
6-27