Sign in to follow this  
Followers 0
vistech

Timer in function block with CP1L-E

5 posts in this topic

I try to modify function block by add timer to FB Structured Text with CP1L-E.After compile I see errors (attached file).I see at manuals that TIMX is not supported by CP1L-E.I tried with others timer instructions and I see errors after compilation.Could you give me help how achieve delay timer in FB Structured Text with CP1L-E?

Share this post


Link to post
Share on other sites
According to manual TIMX is supported in CP1L-E. 1.Have you set the PLC properties to "Execute Timer/Counter as Binary. 2.Use one of the timers from the OMRON function block library.

Share this post


Link to post
Share on other sites
Hello Two things. Bits N Bytes is right that TIMX needs the checkbox checked...however...the CP1L does NOT support the TIMER datatype in ST. It's only available in CJ1 (V4) or any CJ2. The tidiest way I've found of using a timer in a ST FB is to create a LADDER FB with just a TIMER (internal), Start (Input BOOL) and a Timer Done (Output BOOL). You can then nest this inside your ST FB. Let me know if you want to see an example. Pp

Share this post


Link to post
Share on other sites
Thank you Pp for your explanation. This FB is your "Tracking product on conveyor". I need to test it for trigger vision, exactly at bottle line, and I need pulse for vision and next for ejector. I created own timer by using loop "if then". I attached example of code. Dear Pp please show me your example.

Share this post


Link to post
Share on other sites
Hi Attached is a Ladder FB invoked from a ST FB. Also...I noticed a bug. This is the fix. (*Test for product arriving*) If nDistanceToGo<=0 AND nEntryCount>0 then bArrived:=true; nEntryCount:=nEntryCount-1; nStackPointer:=nStackPointer-1; ELSE bArrived := false; END_IF;Do you want to extend the Arrived output? I'd just put a line of Ladder after the FB call to do this. ST hosts TIMER.zip

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0