MOD_CAM: Adjusting a cam
(Original Document)
General
The MOD_CAM function is used to adjust a cam dynamically. Transferring new data does not require the cam processor to switch to STOP. If the transfer is successful, the new parameters are taken into account by the module. If the transfer is not successful, the cam processor remains in RUN with the old values.
The MOD_CAM function assigns the following parameters:
This function applies to a channel and therefore a variable type IODDT. We will use the variable Channel_0 of type T_CCY_GROUP0.
Parameter buffer
The exchange zone used by the MOD_CAM function is a buffer made up of reserved words: %MWr.m.0.16 to %MWr.m.0.18.
Loading the exchange zone
The exchange zone (buffer) can be preloaded:
Sending the new values to the module
After modification in the buffer, the function:
Key
Group: identifies the group number
Cam: identifies the tracknumber
Initializing the parameter buffer
{Get} action or {Read} action
Initializing the parameter buffer
For cam 9 in group 2:
Sending the new
{Send} action
Example
For cam 9 in group 2:
Checking the exchange
At the end of the exchange, the Adjust_err bit is set to 1 if the exchange has not been successful. The READ_STS function is used to update the channel status.
It contains the following data: