Hi guys, am a bit of a beginner, trying to learn plc programming ...in step 7 lite software, can you please give me an example of a ladder program...(analog input and analog output), thanks
Hi Ivo,
Thanks for the help, but the FC105 my way of understanding is for the analog input scaling, how would I write the program to output the analog input proportionately to the say for example control valve?
Thank you Ivo.... Have already tested the program and it work well.(4-20mA input equals 4-20mA output), but I cannot monitor the out in FC106 (PQW256 output) in my laptop or in the HMI. I have assigned the PQW256 as an integer and it doesn't show anything unlike in the FC105 out (PIW256)-which can be monitored. Please help.
Thanks
I would write my own FC as a wrapper for FC106 and include an extra output for monitoring purposes:
Code:
FUNCTION FC 1106 : WORD
TITLE =
VERSION : 0.1
VAR_INPUT
IN : REAL ;
HI_LIM : REAL ;
LO_LIM : REAL ;
BIPOLAR : BOOL ;
END_VAR
VAR_OUTPUT
OUT : INT ;
MONITORED_OUT : INT ;
END_VAR
VAR_TEMP
iData : INT ;
END_VAR
BEGIN
NETWORK
TITLE =
CALL fc106 (
IN := #IN,
HI_LIM := #HI_LIM,
LO_LIM := #LO_LIM,
BIPOLAR := #BIPOLAR,
RET_VAL := #RET_VAL,
OUT := #iData);
L #iData;
T #OUT;
T #MONITORED_OUT;
SET ;
SAVE ;
END_FUNCTION
Thanks, indeed you are correct for the same reasons as I wanted to point out. Only I forgot that even this is impossible to do. Show me that testing/controling is always a part of the solution.
Edit: and now it hits me: I intended to use the method in post #7.