6-18
168542-1CD
168542-1CD
MLX200 Software and
Operations
6 Conveyor Tracking
6.7 Developing a Conveyor Tracking Application
6.7.2.2 Program Structure Details
This section will expand on the information from the previous section and
show how the conveyor tracking instructions will look like in actual
application code. The first step of the application is to activate the User
Frame that is attached to the conveyor and to reset the conveyor state
(Fig.6-18 "Conveyor Initialization Step"). The following actions are
performed to reset the conveyor:
• Moving 0 into the robot's QueueControl.POS variable will act to flush
the queue. Thus, any parts remaining in the queue will be removed.
• The Conveyor0_ResetNewDataFlag variable lets the MLX200 know
that the last value that was added to Conveyor0_LatchedValue has
been processed. In the case that a system is aborted between a part
being detected and processed, adding additional points may not
work correctly if this is not reset.
• The Conveyor0_ResetCounter variable will simply reset the
counter's current encoder count to 0. This is not technically required
but will ensure the application starts from the same configuration
every time.
Fig. 6-18: Conveyor Initialization Step
After the initialization is complete, the program step is incremented to 20.
At step 20, an Axis Motion to the conveyor pounce position is executed.
Note that this step is incremented to 30 when the Sts_DN bit (instead of
Sts_PC bit) of the motion instruction turns on. This means that the
program will move to Step 30 (Conveyor Sync Start) as soon as the
motion is queued rather than waiting for the motion to complete. Thus, if a
part crosses the photo eye while this motion is taking place, it can blend
into the tracked motions. For more information on using the Sts_DN to
trigger application logic, review Section 4.4.2 “DN BIT Checking” on page
4-20.
Output Latch (OTL) and Output Unlatch (OTU) should be used to
toggle the conveyor output signals. Do not use Output Energize (OTE)
as this could interfere with internal tasks.