Search the Community
Showing results for tags 'openpcs'.
Found 1 result
marcoqf73 posted a topic in Other PLCsHello, In past i was using Siemens S7 300 and Simatic 5.3. So a long time ago. I restart look back to plc because i need to monitor the temperature of my heating system. So bought a plc that is a IEC61131-3 standard and OpenPCS as Develop software. So i begin to play with OpenPCS because Im very rusty. SO i create a function, that i named FC_TEST . When i compile the below code i get an error E: S5004: Function blocks instances are invalid in 'FUNCTION'-POUs, STRUCTs, and in ARRAYs. It seams that Timer block inside the function FC_TEST are not allowed, i understood right ? (* --------- DECLARATION --------- *) VAR_INPUT T_1 : TIME ; (*Declare T_1 as a Time Input ==> Set the Time of Timer *) START : BOOL; (*Declare START ad BOOL Input ==> Start The Time of the TIMER *) END_VAR VAR MY_TON : TON; (*Instantiate MY_TON as Timer type TON*) END_VAR (* --------- FC PROGRAM --------- *) MY_TON(IN := START , PT := T_1 ); FC_TEST := MY_TON.Q; (* --------- CALL THE FC--------- *) tmp2 := FC_TEST(T#2s, I0_0); (* I0_0 is a input*) Thanks Marco