Jump to content

Functionblock Timer In Structured Text


Recommended Posts

Posted
Can anyone tell me how i can use an FB in Structured Text. I would use a TIMER_100_FB_M in a CASE instruction. CASE Step OF 0..99: TIMER_100_FB_M(Coil:= ?BOOL? ,Preset:= ?INT? ,ValueIn:= ?INT? ); IF (* time *) THEN Step := 500; END_IF; 500: TIMER_100_FB_M(Coil:= ?BOOL? ,Preset:= ?INT? ,ValueIn:= ?INT? ); IF (* time *) THEN Step := 10; END_IF; END_CASE; I know that I could use the function TIMER_M, but in these function the TS1 is being high when the CASE is in an other step. And I would also use other Function Blocks in Structured Text. I'm using GX IEC developer 6.10 for a FX2N plc. Thnx.. Djokke

Posted
I recommend that U should not use Structured text in an FX2N PLC. Or at least very little. The problem with structured text in an FX PLC is that U are limited with Labels. In the new FX3U plc this is better. If U also have the GX-Developer software U will see that the possibility to create an program in structured text is not possible. In GX-IEC it is possible unfortunatly. The timer as a function block U would like to use is like follows: FB1(Coil:=VarCoil,Preset:=K100,ValueIn:=K0,ValueOut:=VarValueOut,Status:=VarOutStatus); U should declare the variables in you're list. The variables can u use in you're program as follows : D1 := FB1.VarValueOut

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...