MotionIn is used for high speed counting of digital input signals. It’s a background task. Once a MotionIn Block is executed, it’ll continue counting in the background until another Motion In block set to Stop is executed.
|To enable MotionIn , Press the ‘Setup Hardware’ button. It’s on the upper left of vBuilder. Your ‘Setup Hardware’ button may look a little different from the one on the left, depending on whether you’ve setup your hardware and on the specific hardware you’re using.|
The last page of the Setup Hardware lets you set MotionIn (High-Speed Counter) options. There are 2 MotionIn types: Pulsed Input and Quadrature Input.
Shown bellow, is the setup pages for each MotionIn type.
Above shows 1 device setup for MotionIn . You can set up a MotionIn for all ACE PLC.
Quadrature Inputs are used with incremental rotary encoders. Check out Wikipedia’s article on them to learn more.
They require 2 Digital Inputs. Be sure not to use the same Digital Input for both Quadrature Inputs.
Start Counter requires an I32 Tag to store the count in.
Pulsed Input requires 1 Digital Input. After configuring in Setup Hardware, placing a MotionIn Block brings up the following Dialog.
The Tag you select for ‘Count Value’ will store the MotionIn count value. Count Value must be of the I32 Data Type.
The MotionIn block can be set to count up or down. A count is triggered by either a rising (0 to 1) value, or a falling (1 to 0) value.
The ‘counter Input Bit’ that causes the count is the Digital Input that you selected in ‘Setup Hardware’.
Selecting Stop will stop the MotionIn counter.
In Ladder: How to execute tasks only once at startup?
Useful for defining the starting value of certain tags or for background tasks.
Note: Since some tools are background tasks, it is not necessary to run them every PLC cycle. If you run it every cycle, the tool will not work properly because you are constantly configuring it.
Just add a "BIT" that will be turned ON right after.
|All your lines that only need to start once at startup :
Note: You can use any name for the ColdStart bit.