Download "user manual"
Transcript
PLC (* Set CAN node number *) TargetID := 50, (* Select PDO (Standard for PDO2 setpoint4, setpoint5 SK540E) *) PDO := 2, (* Specify length of data (Standard for PDO2 is 4 *) LENGTH := 4, (* Transmit *) Dir := 1); (* Configure PDO *) PDOConfig( Execute := TRUE, (* Configure Messagebox 2 *) Number := 2, (* Set CAN node number *) TargetID := 50, (* Select PDO (Standard for PDO1 status word, actual value1, actual value2, actual value3) *) PDO := 1, (* Specify length of data (Standard for PDO1 is 8 *) LENGTH := 8, (* Receive *) Dir := 0); 9.8.7.4 FB_PDOSend With this FB, PDOs can be transmitted on a previously configured channel. This is possible either as a one-off or cyclical transmission. The data to be transmitted is entered in WORD1 to WORD4. Transmission of the PDO is possible regardless of the CANopen state of the frequency inverter. The previously configured PDO channel is selected via NUMBER. The data to be transmitted is entered into WORD1 to WORD4. Via CYCLE one-off transmission (setting = 0) or cyclical transmission can be selected. The PDO is sent with a positive flank on EXECUTE. IF DONE = 1 all entries were correct and the PDO is sent. IF ERROR = 1 there was a problem. The precise cause is saved in ERRORID. All outputs are reset with a negative flank on EXECUTE. The time base of the PLC is 5ms; this also applies for the CYCLE input. Only transmission cycles with a multiple of 5ms can be implemented. VAR_INPUT Input Type Output Description Type EXECUTE Execute BOOL DONE PDO transmitted = 1 BOOL NUMBER Messagebox number Value range = 0 to 19 BYTE ERROR Error in FB BOOL CYCLE Transmission cycle BYTE Value range = 0 to 255 0 = Disabled 1 to 255 = Transmission cycle in ms ERRORID Error code INT WORD1 Transmission data Word 1 INT WORD2 Transmission data Word 2 INT WORD3 Transmission data Word 3 INT WORD4 Transmission data Word 4 INT BU 0000 GB Description VAR_OUTPUT 165