Programming instructions

73
11.7 Forcing Bits and Changing Registers
It can often be helpful to run sections of PLC code while writing a program. This
allows the programmer to test parts of the code while the program is small
enough to make changes easily. This can be done without the use of switches
and other devices; all that’s required is the PLC and GX-Developer. This is
called FORCING.
1) Put the PLC in Run Mode
2) Open program and put GX-Developer into Monitor (Write) mode
3) Holding the Shift Key down, double click on X10
4) After observing the change, do a shift and double click again.
Notice that Y0 comes on, while X10 is off. In the FX-Series, real world inputs can
only be forced on for a single scan. Real world outputs that are used in ladder
logic can only be forced on for one scan as well. Any address with a physical
input will revert back to its real world input state at the beginning of the next PLC
scan when the physical inputs are read. Outputs used in the PLC code will revert
to the program controlled output state upon next PLC scan. Internal bits, like M
relays, can be forced on and stay on, as long as they are not being controlled by
the program in the PLC.
This is the easiest way to turn contacts and relays off and on. This isn’t
recommended when the PLC is connected to a running system, however. There
is no message that warns that the change is about to happen, and dangerous
results could occur.
1) Go to Online Æ Monitor Æ Entry Data Monitor Æ Device Test
2) Enter X10 into Device textbox in the Bit Device section
3) Click Force ON
It is possible to enter numbers into data registers through this dialog box as well.
1) Enter D0 into the Device textbox in the Word Device section
2) Enter 10 into the Setting Value textbox
3) Click the Set command button
Check to see that a 10 has been entered into data register D0.
1) Go to Online Æ Monitor Æ Device Batch Monitor
2) Enter D0 into the Device textbox
3) Click on the Start Monitor button
11.8 EXERCISE Contacts and Coils
Please find Project #1 in the appendix. This project is intended to give the
student practice in entering and controlling ladder logic.