vistech Posted June 1, 2015 Report Posted June 1, 2015 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? Quote
BITS N BYTES Posted June 1, 2015 Report Posted June 1, 2015 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. Quote
ParaffinPower Posted June 2, 2015 Report Posted June 2, 2015 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 Quote
vistech Posted June 2, 2015 Author Report Posted June 2, 2015 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. Quote
ParaffinPower Posted June 2, 2015 Report Posted June 2, 2015 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.