TRF_RECIPE Instruction
(Original Document)
Reminder
This instruction enables you to read or write the cam profiles and to begin the execution of special functions.
Note: The given parameter length of TRF_RECIPE defines a number of words (double or floating) whatever the type of information exchanged.
NOTE: This service is also used to read or write the variable speed controller parameters with the "Real axis" function, (See TRF_RECIPE).
NOTE: Parameter exchanges (READ_PARAM, WRITE_PARAM, SAVE_PARAM, RESTORE_PARAM) cannot be performed at the same time as the TRF_RECIPE instruction.
Syntax of TRF_RECIPE instruction
TRF_RECIPE (IODDT_VAR, length, address %MW): transfers the cam profile parameters from the table of %MW words. The length of this table to be transferred is defined by the length parameter. The action to be carried out is defined by the word %MWr.m.c.10 (ACTION_TRF).
Example: TRF_RECIPE (IODDT_VAR, 100,200) reads the "Slave" table of cam profile 25 of the module located in position 4 of rack 1, then transfers this to the PLC, from address 200. For an IODDT_VAR variable declared as type T_CSY_CAM and associated with channel 25 of module 4 from rack 1.
TRF_RECIPE Interface
The command to be carried out is defined in the word %MWr.m.c.10 and the result of the command is available in the word %MWr.m.c.3 to %MWr.m.c.8.
Address
Type
Symbol
Meaning
%MWr.m.c.10
Word
ACTION_TRF
Action to be carried out
%MWr.m.c.3
Word
ERROR_TRF
Write error of the TRF_RECIPE command
%MDr.m.c.4
Double word
RETURN_TRF_1
Return 1 of the function
%MFr.m.c.6
Floating point
RETURN_TRF_2
Return 2 of the function
%MFr.m.c.8
Floating point
RETURN_TRF_3
Return 3 of the function
%MDr.m.c.11
Double word
PARAM_TRF_1
Parameter 1
%MDr.m.c.13
Double word
PARAM_TRF_2
Parameter 2
%MFr.m.c.15
Floating point
PARAM_TRF_3
Parameter 3
%MFr.m.c.17
Floating point
PARAM_TRF_4
Parameter 4
Actions Carried Out by TRF_RECIPE
The actions that can be carried out using the TRF_RECIPE service are:
Function
ACTION_TRF
(%MWr.m.c.10)
Meaning
Cam profile
1
Reading the "master" table.
Cam profile
2
Reading the "slave" table.
Cam profile
3
Reading the "master" and "slave" tables.
Cam profile
101
Writing the "master" table.
Cam profile
102
Writing the "slave" table.
Cam profile
103
Writing the "master" and "slave" tables.
Legend
Writing the drive into the module
PARAM_TRF_1 = 0. On MW
Writing the module into the drive
PARAM_TRF_1 = 1. On KW
Reading
PARAM_TRF_1 = 0.
PARAM_TRF_2 = OFFSET
PARAM_TRF_3 and PARAM_TRF_4 = 0
RETURN_TRF_1(%MDr.m.c.4)=length of the table read or written
RETURN_TRF_2 and RETURN_TRF_3 = 0
Monitoring the Exchange
The following 2 bits can be used to monitor the exchanges carried out with the help of TRF_RECIPE instruction:
Bit
Meaning
%MWr.m.c.0.3
Exchange in process.
%MWr.m.c.1.3
Incorrect exchange.