Hi, i need to communicate with a profibus device
input 24 byte
output 6 byte
i want to use my PID adress and not a INT so i can use crossref to find it.
so i have this,
now i want to read 24bytes from that adress and store that in L4.0 that i have a 24 bytes struct
and how do i write in stl code with that struct, i have done it in a FC
but think to learn to make source file for this fc
Best regards,
Ason
input 24 byte
output 6 byte
i want to use my PID adress and not a INT so i can use crossref to find it.
so i have this,
now i want to read 24bytes from that adress and store that in L4.0 that i have a 24 bytes struct
and how do i write in stl code with that struct, i have done it in a FC
but think to learn to make source file for this fc
Code:
FUNCTION FC 1 : comm
TITLE =
VERSION : 0.1
VAR_INPUT
HW_Addr : POINTER ;
END_VAR
VAR_OUTPUT
i_Addr : INT ;
END_VAR
BEGIN
NETWORK
TITLE =return integer address of Peripheral variable
L P##HW_Addr;
LAR1 ;
L D [AR1,P#2.0];
SRD 3;
T #i_Addr;
SET ;
SAVE ;
END_FUNCTION
Best regards,
Ason