The PC HMI starts the X-Y-Y′ homing program, then receives Buffer is Open when it tries to read P50. The homing motion can still finish correctly; the failed poll means the controller’s ASCII command interpreter remains in program-entry mode when the query arrives. Treat buffer closure, motion execution, and status polling as three separate commissioning steps.
Command-path prerequisites
- Identify every client that can write to the controller’s command interface: the PC HMI, PWIN terminal, download utility, and any background service. Permit only one outstanding ASCII transaction per command channel.
- Before anything else, confirm that the stored program is closed. Send a standalone
CLOSEthrough the same command path used forOPEN PROG 101 CLEAR, then read a harmless controller variable. Do not move on until the read returns a value rather thanBuffer is Open. - Confirm the program-launch transaction receives its normal acknowledgement before starting the
P50poll. Do not concatenate program editing, program launch, and variable reads into one unverified character stream.
OPEN PROG 101 CLEAR selects and clears a program buffer so subsequent text is stored as program content. CLOSE returns the command interpreter to immediate-command mode. A P50 request sent before that transition can be parsed as attempted program text instead of a read request. Manually entering CLOSE restores polling because it corrects the parser state; it does not prove that the HOME motion itself failed.
Program download closure
- Download the definition beginning with
OPEN PROG 101 CLEAR. - Transmit the entire motion program without inserting HMI polls into the download stream.
- Transmit the final
CLOSEas a separate command and wait for its acknowledgement. - Read back a known variable before allowing the HMI to launch the program. This read is the acceptance test for buffer closure.
Place the download operation in a commissioning or maintenance state, not in the normal homing cycle. The CLOSE shown after the program body closes the definition buffer during download; it is not a runtime statement reached after homing. Repeatedly downloading the program immediately before execution creates a race in which the HMI can begin polling while the controller still accepts program text.
If multiple software components share the controller, protect the complete open-write-close exchange with one command-channel lock. Also log the transmitted command, acknowledgement, and timestamp. The required check is simple: after every download, an immediate read of P50 must succeed before program execution begins.
Homing-stage configuration
The routine contains three distinct motion stages. Commission and verify them separately before relying on the final completion bit.
| Stage | Direction/speed settings | Capture controls | Offsets | Command |
|---|---|---|---|---|
| Clear an active home limit |
I123, I223, or I323 = 50
|
I7012, I7022, or I7032 = 10
|
Initial I126 = 16000
|
Individual HOME1, HOME2, or HOME3
|
| First three-axis pass |
I120/I220/I320 = 200; I121/I221/I321 = 50; I123/I223/I323 = -100
|
I7012/I7022/I7032 = 2; I7013/I7023/I7033 = 2
|
I126 = -16000, I226 = -1000, I326 = -16000
|
HOME1..3 |
| Final three-axis pass |
I120/I220/I320 = 200; I121/I221/I321 = 50; I123/I223/I323 = 10
|
I7012/I7022/I7032 = 10; I7013/I7023/I7033 = 2
|
I126 = 16000, I226 = 16000, I326 = 16848
|
HOME1..3 |
The final HOME1..3 changes capture control, direction/speed, and offsets; it is not a duplicate of the first pass. Removing it shortens the transaction window and changes the established home result, so disappearance of the polling symptom does not identify that command as the buffer-opening operation.
The routine temporarily kills one gantry motor with COMMAND"#3k" or COMMAND"#2K" while its partner clears a limit, then re-enables it with COMMAND"#3J/" or COMMAND"#2J/". Test these branches at reduced machine risk and confirm both motors are enabled before either simultaneous HOME1..3 command.
HMI launch and polling handshake
- Set
P_HOMING_ROUTINE_COMPLETE, identified asP50, to0before starting motion. - Launch the already stored motion program using the controller’s normal run operation. Wait for the launch acknowledgement before issuing another ASCII command.
- Poll
P50with one request outstanding at a time. TreatBuffer is Openas a communications-state fault, not as a value ofP50. - Continue only when the response is a valid value. A returned
1indicates that execution reached the assignment after the finalHOME1..3.
The program sets P_MOTOR1_HOME_STATUS, P_MOTOR2_HOME_STATUS, and P_MOTOR3_HOME_STATUS to 1 at entry, then changes all three to 0 before setting P50=1. Those names do not define their polarity; commission the HMI labels against observed program execution rather than assuming that 1 means homed.
Verify that the controller does not execute the P50=1 assignment until all three axes have completed the final HOME operation. If program execution can advance while motion remains active, gate P50 with the controller’s documented home-complete and stopped conditions.
Branch and recovery checks
The line IF (ESTOP_Button=1) conflicts with the comment stating that an active E-stop must prevent homing. Determine the actual input polarity from the live variable and machine wiring. With the safety condition active, the program must take the non-homing branch and leave P50=0. With the safety condition healthy, it must enter the homing sequence.
- On
Buffer is Open, stop issuing repeated polls so they cannot add traffic to the wrong parser state. - Record whether a download was active and which client last sent
OPEN,CLOSE, or the run request. - Send
CLOSEonly when no legitimate program download remains in progress. - Read
P50again. If the read succeeds, correct the missing acknowledgement, channel lock, or download/run sequencing that left the buffer open.
Do not use automatic, unconditional CLOSE commands as the normal polling strategy. They can terminate an intentional edit and hide the client that broke transaction ownership.
End-to-end verification
- Power or reset the command session as required by the commissioning procedure, then download Program 101 through one open-write-close transaction.
- Confirm an immediate read of
P50succeeds while the program is idle. - Run each active-limit clearing branch and verify that the killed gantry motor is re-enabled.
- Run the first and final
HOME1..3stages. Confirm the configured capture controls and offsets are active for the intended stage. - During motion, poll
P50repeatedly and verify that every reply is a valid value, with noBuffer is Openresponse. - At completion, confirm
P50=1, all three motor status variables are0, limits are restored withI124/I224/I324=$8001, and the final software-limit settings have been written.
FAQ
What happens if the HMI polls P50 while the program buffer is open?
The command interpreter returns Buffer is Open instead of the value. Complete the download with CLOSE, wait for its acknowledgement, and prove closure with a successful variable read.
What happens if I remove the final HOME1..3 command?
The buffer symptom may disappear because the cycle and command timing change, but the routine also loses the pass using speed/direction 10, capture control 10, and offsets 16000, 16000, and 16848.
What happens if two applications use the controller command channel?
Their open, close, run, and poll transactions can interleave. Serialize access so one client owns the complete transaction until it receives the final acknowledgement.
What happens if ESTOP_Button equals 1?
The code enters the IF (ESTOP_Button=1) branch, although its comment says an active E-stop should prevent homing. Test the live polarity and confirm the unsafe state leaves P50=0.
What happens if P50 reaches 1 before the axes stop?
The HMI can release the machine before homing is physically complete. The final verification is to confirm stopped, correctly referenced axes and restored limit settings at the same time that the controller returns P50=1.