Sign in to follow this  
Followers 0
cauchy

ladder logic test difference in GX Developer

7 posts in this topic

Hi, Im using GX developer. Im testing the ladder with ladder logic test.Im forcing an input during logic test but Sometimes output is changing and sometimes isn't changing. ?s there anybody who lives that problem?

Share this post


Link to post
Share on other sites
"force" only sets or resets bit. if this is used in program (maybe coil or MOV or whatever) and this part of program happens to be scanned, state of the bit will eventually be changed. in my experience forced inputs behave differently, if input is low, you can force it high but if it is high you can't force it low. also there is no indication of forced status other than log. this doesn't help if you go offline and return later on. safest way to clear all forces without risk of forgetting something is by resetting CPU. if you want to force I/O just to verify wiring for example, try stopping CPU (so outputs are not overwriten) and then force. if i have to add "real" force to a program written by others and do some testing while CPU is running, i simply add BMOV instruction on end of program that copies bunch of M bits for example to outputs. this is quick and dirty but it works and you can set and reset every output while CPU is running. this might be usefull when adjusting something if PLC is measuring position for example etc.

Share this post


Link to post
Share on other sites
Forces in the FX family only work for one scan. If your program changes the state of an output, forcing it will only work until the next program scan. Same for inputs. At the beginning of the program, it reads all the real inputs, and they overwrite any forces you may have set. Of course depending on how you wrote your program, one scan is enough to activate the logic. The only thing that can be forced and maintain it's status is M bits which are not used as coils in the program. That way no real world input or program code will modify it once you turn it on. I find myself putting in OR contacts around my inputs when debugging to try and force something to happen.

Share this post


Link to post
Share on other sites
Hi Crossbow, I think idea that you said is right. The problem is M bits which are not used as coils. You said that I find a solution using OR contacts. How do you use this contacts and what do you make "OR" with ? --------||---------- | X1 | |__?____|

Share this post


Link to post
Share on other sites
cauchy You can use any M flag that does not have a coil. That way you can force on and off that M flag as you require. Rodney

Share this post


Link to post
Share on other sites
Thanks Panic, But I usually use BMOV instruction for data registers D. for example directly D1,D2,etc. And I know that it is used with KnX, KnY, KnM, KnS, T,C,D, V, Z (RAM) File registers, How can I use for M bits and Outputs?

Share this post


Link to post
Share on other sites
cauchy, panic mode means that you can use an image of m bits (as a mask) and simply write to the outputs using the MOV/ BMOV instruction. Example: MOV K4M100 K4Y0. If M101 turns on, Y1 turns on. If M101 is off, Y1 turns off. Basically, switching the M bits on will result in an output being switched.

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