DU10MbRetry
D = Device(MODBUS)
U = Utility functions
The DU10MbRetry function manages the execution of the SEND command to the MODBUS device and check the success of the command admitting a series of programmed in the event that the data is altered during transmission.
IMPLEMENTATION
DU10MbRetry (Modbus, MaxAttempt, RelaxTime, Attempt, Result)
Parameters:
IN/OUT | VARIABLE TYPEE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
IN | INTDEVICE | Modbus | - | Mnemonic name of MODBUS devices used |
IN | SYSTEM o GLOBAL o CONST | MaxAttempt | B | Maximum number of retries. Setting 0 the command must be satisfied on the first try. |
IN | GLOBAL o CONST | RelaxTime | L | Indicates the time between an attempt and the subsequent. With zero there is no time. |
OUT | GLOBAL | Attempt | B | Returns the value of the retries. |
OUT | GLOBAL | Result | B | Result of the operation: 0 = a successful command (in Attempt to evaluate possibly if they were attempts). 1 = exit for reasons too many attempts. 2 = exit for incorrect value of err parameter (other than 6, 51, 52, 53,54 or 55). 3 = exit for incorrect value of parameters (Maxattemp < 0 or tout parameter to zero. \\ |
Note
The attempts are executed only if the parameter err parameter takes the 6, 51, 52, 53,54 or 55 values.
Is never evaluated serr parameter.