Sign in to follow this  
Followers 0
jydepower

Busting brain with logical operation

10 posts in this topic

Hallo all. Im strugling with some, what should be simple logical operation. I have a touch screen that logs data from the plc, when a tag goes from 0 to 1 or 1 to 0(i cant change this toggle type). Tag is called EnableLog and linked to a variable called EnableLog in the plc I want to start log when another variable called Data1 goes 1 > 0 So... Problem is when i reset Data1 to 0. The EnableLog sees thats as a toggle and does a second log. I think i have to somehow say: EnableLog for each time Data1 goes 1 > 0 Been trying to solve this for some hours now, but i cant solve it. Im using Gx iec developer with a q03 plc (ladder) The touchscreen is a EPC t190 with Ix developer. Hope anyone can help. Regards Martin

Share this post


Link to post
Share on other sites
Use a PLS instruction (for rising edge triggering) or a PLF (for falling edge triggering). That will ensure to only send 1 pulse (note: a single pulse only) either on rising/falling edge.

Share this post


Link to post
Share on other sites
I have tried with PLS and no succes. Heres what happens: Data1 goes > 0 Then EnableLog goes 1 When EnableLog goes 1 the panel logs Data1 After a timer runs out (to make sure all data is collected) Data1 is reset to 0 When Data1 goes 0 EnableLog also goes 0, then panel logs again. So i get 2 logs for each log. One with Data1 > 0 and one with Data1 = 0 Hope this makes sense :)

Share this post


Link to post
Share on other sites
So the problem is in iX and not in the PLC...!? What function(s) do you use for logging in iX?

Share this post


Link to post
Share on other sites
Under settings in Data logger i can choose between loggin within a time interval or on a tag event. So i choose tag event and put in the EnableLog tag. The manual says it will log when the tag goes either from 0 to 1 or from 1 to 0. If i could say each time it goes 1 it would be easy. But i dont see that option.

Share this post


Link to post
Share on other sites
You'll need to add a custom expression. See picture.

Share this post


Link to post
Share on other sites
Oh. So i dont need to put in a tag under the settings menu?

Share this post


Link to post
Share on other sites
Hmm pretty sure i did exactly like that. But it still logged when Tag1 turned back to 0. I dont need to put expressions on the Data tags i log right?

Share this post


Link to post
Share on other sites
Look what i found on Beijers website. Im gonna try that tomorrow. iX Datalogger - Double records for each log event When using the log once on tag connection, please mind that event will be fired (executed) on each "edge" false -> true and true -> false. Using an momentary signal will result in 2 log records for the same event. See below how to prevent that. Best Practice: Panels:Triggered by user, using a so called "Action", use "Toogle Tag" in "Controller" or even better the dedicated action "Log Once" found in "Others". PLC: Use following instructions FXxy-series: ALT (Alternate State) Q/L-system: FF (Flip-Flop)

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