The MOD_PARAM function is used to adjust an dynamically. In this case, transferring modified data does not mean that the must be switched to STOP. If the transfer is successful, the new parameters are taken into account by the module. If the transfer is not successful, the module uses the old axis adjustment values.
This function applies to a channel and therefore a IODDT type variable. We will use the variable Channel_0 of type T_CCY_GROUP0.
MOD_PARAM assigns the following parameters to each exchange:
-
PRESET_ANG_VALUE: angle value
-
PRESET_TURN_VALUE: recalibration value of the number of
-
SLACK_VALUE: axis backlash value
-
MAX_PIECES: parts counter limit value
The exchange zone used by the MOD_PARAM function is a buffer made up of reserved words: %MWr.m..0.16 to %MWr.m.0.19.
Loading the exchange zone
The exchange zone (buffer) can be preloaded:
-
with the initial adjustment parameters MOD_PARAM (Channel_0,0,0,0,0) action {Get}
-
with the current adjustment parameters MOD_PARAM (Channel_0,1,0,0,0) action {Read}
Sending the new values to the module
After modification in the buffer, the MOD_PARAM (Channel_0,2,0,0,0) function, action {Send} sends the new values to the module and updates the current parameters zone.
Initializing the parameter buffer
{Get} action or {Read} action
{Get} MOD_PARAM (Channel_0,0,0,0,0);
{Read} MOD_PARAM (Channel_0,1,0,0,0);
{Send} action
{Send} MOD_PARAM (Channel_0,2,0,0,0)
During the transfer, the bit (x15) Adj_In_Prog is at 1. At the end of the exchange, the Adjust_err bit is set to 1 if the exchange was not successful. The READ_STS function is used to update the channel status.
It contains the following data: