AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Troubleshooting

WaitWObj Waits Forever: Tracking Object Not Connected

Servo and stepper motion Published 7 min read By AutomateDirectUSA engineering team

Short answer

WaitWObj ConveyorTest\RelDist:=0.5 blocks by design until the conveyor tracking interface submits and accepts a tracking object for CNV1; socket coordinates never do that job. Prove three conditions in order: ActUnit CNV1 with a changing encoder position, okConverter TRUE after StrToVal, and an accepted object event. At an example 200 mm/s belt the 0.5 mm wait distance releases in 2.5 ms, so a hold you can see means the object queue is still empty.

On this page
  1. What the wait is waiting for
  2. Work the checks in this order
  3. Check the encoder while the belt runs
  4. Check the conversion result before the pick
  5. Check the object event in the tracking configuration
  6. The wait distance releases in milliseconds
  7. Fix the loop before retesting
  8. The decision for each case
  9. Questions asked

WaitWObj ConveyorTest\RelDist:=0.5 holds by design until the conveyor tracking interface submits and accepts a tracking object for the active conveyor unit, and nothing in this program ever does that. The camera coordinates arriving over the socket fill the pick offset picking_string; they are not the object the wait is looking for. Prove three conditions in order before touching any robot target: ActUnit CNV1 executing with a changing encoder position, okConverter TRUE after StrToVal, and an accepted object event for CNV1, whose residual wait distance the belt covers in milliseconds. Work the checks below in that order; in this pattern the hold almost always traces to the third one, because the only output written for object generation sits commented out.

What the wait is waiting for #

The controller's conveyor tracking application manual states the job plainly: the instruction connects an object on the conveyor to the tracking work object and holds the program until that connection has happened. It raises nothing when no object arrives, so an empty queue looks like a silently stuck task. The module mixes three data paths, and only one of them can release the wait:

  • The socket path — SocketSend asks the camera for a photo, the reply is either the PhotoTaken acknowledgment or a coordinate string, and StrToVal turns the string into picking_string, the pos used by the pick moves.
  • The tracking path — the conveyor tracking interface must submit a detected object, associate it with the mechanical unit CNV1, and have the controller accept it.
  • The target path — ConveyorTest is declared with CNV1 as its mechanical unit, so the work object is already bound to the right conveyor; the frames and robtargets are not what blocks.

The code as written services the first path and waits on the second, with nothing firing the second. The sequence skeleton, with the checks in place, looks like this:

ActUnit CNV1;
! belt turning: the encoder position of CNV1 must change
okConverter := StrToVal(receive_string, picking_string);
IF okConverter THEN
    ! the configured object event for CNV1 fires here, once per detection
ENDIF
WaitWObj ConveyorTest\RelDist:=0.5;

Work the checks in this order #

Cheapest first, with the confirming check named for each:

  1. The unit is active and counting — ActUnit CNV1 has run and the encoder position changes while the belt turns. Confirming check: jog the belt a known distance and read the position change.
  2. The camera string converts — the message is a coordinate string rather than the PhotoTaken acknowledgment, and okConverter comes back TRUE from StrToVal. Confirming check: log the string and the flag on every receive.
  3. An object event fires and is accepted — the event your conveyor tracking configuration defines for object creation fires once per camera detection and the controller accepts it for CNV1. Confirming check: one detection, then the wait releases.
  4. The wait distance is covered — after acceptance the object must reach the RelDist wait distance ahead of the tracking window; the arithmetic below shows how little time that takes.

The first two checks cost a belt jog and a debug print. The third costs reading the tracking configuration. Only the fourth involves numbers.

Check the encoder while the belt runs #

ActUnit CNV1 is present in main, so assume activation and go to the counting. With the belt running under power, open the position of the mechanical unit: the encoder position has to change, and to change by the distance the belt moved.

Two failure shapes tell you where the problem sits. A frozen position with a running belt usually means wiring or configuration between the encoder and the controller, and the page on wiring the encoder to the controller covers that path step by step. A healthy-looking status with the position pinned near zero matches the fault described in why conveyor tracking stays at null speed with green LEDs. Confirm either way with a jog of one known distance: if the belt travels 300 mm and the reported position moves 300 mm, counting is proven.

Check the conversion result before the pick #

The loop converts every message it receives, the PhotoTaken acknowledgment included, into picking_string, then calls P_Pick without ever testing okConverter. StrToVal returns FALSE when the string holds no value, and a FALSE result leaves picking_string at its previous content, so the pick can run on a stale or empty offset while the camera itself is fine. Split the two message kinds and gate the pick on a valid conversion; the sketch below is illustrative and uses the module's own variable names:

SocketReceive client_socket \Str := receive_string;
IF receive_string <> "PhotoTaken" THEN
    okConverter := StrToVal(receive_string, picking_string);
    IF okConverter THEN
        ! coordinate string accepted: fire the object event, then pick
    ENDIF
ENDIF

The socket link itself is not the blocker: a program parked at the wait line has passed SocketReceive and the loop body, so the connection on port 5050 is up.

Check the object event in the tracking configuration #

This is the hold in this pattern. Nothing in the code submits a tracking object, and the conveyor tracking configuration is what defines the event that does, a trigger signal or an interface message tied to one conveyor unit. The only output in the module written for that role, DO_TrackSync, exists solely as commented-out SetDO operations, so even a valid coordinate string has nowhere to go.

Open the tracking configuration, find the object-creation event, confirm which unit it names, and fire it once per camera detection. An encoder alone does not create objects; what a conveyor tracking retrofit needs beyond an encoder makes the same point from the hardware side. If your cell queues parts in its own controller logic instead of the robot's object queue, the discipline is identical in how to track conveyor parts with an encoder and a FIFO buffer: prove the queue before the pick. Acceptance shows directly, fire the event once and the wait line releases.

The wait distance releases in milliseconds #

Inputs: the wait distance is 0.5 mm, the program's RelDist value; belt speed 200 mm/s is an example input, and you read yours from the encoder position change per second while the belt runs at production speed. The wait releases when the accepted object reaches that distance ahead of the start of the tracking window, so the residual wait is distance over speed:

t = 0.5 mm ÷ 200 mm/s = 0.0025 s ≈ 2.5 ms

At a slow 50 mm/s the same gap takes 0.01 s, 10 ms. This is a calculated example for those inputs, not a measured result, and the conclusion holds across any belt speed you will run: once an object is accepted, the distance condition closes in milliseconds. A hold you can observe, half a second or a full minute, happens before acceptance. A visible hold at WaitWObj is evidence that the object queue is still empty.

Fix the loop before retesting #

  • Send one message kind at a time: the PhotoTaken acknowledgment or the coordinate string, never both through the same conversion.
  • Test okConverter and skip the pick on FALSE.
  • Fire the configured object event once per accepted detection, before P_Pick.
  • Remove the doubled placement: main calls P_CameraSequence, whose loop already calls P_Place, and calls P_Place again after the loop ends. Keep one placement per cycle.
  • Put the place targets on the right frame: every placement move currently runs on the tracked work object, but nothing shows the place station riding the belt; the module already declares a static work object, ConveyorTest1, so fixed place targets belong there.

One safety note before retesting: a task parked at WaitWObj leaves a live belt and a robot holding position, so stop the cycle and lock out both drives before reaching into the pick window to jog parts or probe the encoder.

The decision for each case #

  • Encoder position frozen while the belt runs — fix the encoder wiring and configuration first; the wait is not the fault.
  • okConverter FALSE, or never tested — fix the message handling; the wait is not your problem yet.
  • Valid coordinate string, no accepted object — find and fire the object-creation event in the conveyor tracking configuration, and check which unit it names.
  • Event fires and is accepted, hold persists — compare the object's unit association against the mechanical unit named by ConveyorTest, CNV1; a mismatch connects nothing.
  • All three proven and still blocked — only then is the target data the suspect.

Decision: in this pattern the hold traces to a missing object event, so prove encoder, conversion, event, in that order, and expect the wait to release within milliseconds of acceptance, not after minutes.

Questions asked

Why does the robot sit at WaitWObj with no error message?

Waiting is the instruction's documented behaviour, not a fault: it holds the program until an object on the conveyor has been connected. An empty object queue produces no alarm and no event entry, so the task simply stops advancing at that line. That silence is why the proof has to come from the checks: the encoder counting, the conversion result, and an object event that actually fires for CNV1.

Do the camera coordinates sent over the socket connect the tracking object?

No. The socket data is converted into the pick offset variable, picking_string, and nothing more. Connecting an object is a separate job done by the conveyor tracking interface, which must submit the detection and associate it with the conveyor unit named in the work object. Until that submission happens, valid coordinates and an empty object queue coexist, and the wait keeps holding.

What does the 0.5 in RelDist:=0.5 set?

A wait distance of 0.5 mm: an accepted object is connected when it is that far ahead of the start of the tracking window. At an example belt speed of 200 mm/s the gap closes in 2.5 ms, so the value behaves like connect-as-soon-as-accepted. A larger setting changes the picture: 500 mm at the same speed adds 2.5 s, long enough to be mistaken for a second hold.

Which command submits the tracking object?

The program shown never names one, and the answer lives in the conveyor tracking configuration rather than in the task code. The configuration defines the event that creates the object, commonly a trigger signal or an interface message, and the conveyor unit it belongs to. Find that definition, confirm the unit it names, fire it once per camera detection, and watch the wait release.

Why check okConverter if the robot picks anyway?

StrToVal returns FALSE when the received string holds no valid value, and in this loop that includes the PhotoTaken acknowledgment. Untested, the program picks with picking_string left at whatever it held last, so the pick offset can be stale or empty while the camera itself works fine. Convert only coordinate messages and gate the pick on a TRUE result.

Keep reading

  • Troubleshooting

    Servo Position Counts Up While the Motor Is Stationary

    Counts that rise while the motor shaft is held still are false feedback counts, not motion. Compare the controller's tell-position reading against the drive's rotor-position display: a drive value steady within 1 count while the controller climbs condemns the simulated-encoder path. Isolate the encoder output, cable, breakout and counting input by substitution, one part at a time, cheapest check first.

    Servo and stepper motion

  • Explainer

    What a Conveyor Tracking Retrofit Needs Beyond an Encoder

    Conveyor tracking works only when the robot controller has the licensed tracking software option and a matching encoder interface unit reading a real encoder driven by the conveyor. An encoder alone, a faster robot program, or a timer estimate changes nothing, because position error equals conveyor speed multiplied by timing error.

    Servo and stepper motion

  • Explainer

    What Limits Counts per Meter in Robot Conveyor Tracking

    No hard maximum exists on the counts-per-meter scaling value. The working limits are the measured calibration counts (below 5000 tracking accuracy suffers, beyond 10000 calibration error dominates) and the encoder interface's maximum count rate at top conveyor speed. A worked example shows how to check both.

    Servo and stepper motion