Jump to content

Recommended Posts

Posted
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?
Posted
"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.
Posted
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.
Posted
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 | |__?____|
Posted
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
Posted
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?
Posted
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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...