The AM series (mid-range controllers, programmed in AutoShop) offers three online debugging tools: live monitoring to watch variables, breakpoints/stepping to follow the flow, and the oscilloscope (Trace) to see curves. The first two answer "is the logic right", the last answers "is the process good" — PID oscillation, timing conflicts and loop jitter only show up as curves. The sections below cover connecting, monitoring, breakpoints and the oscilloscope.
After configuring the connection in AutoShop (Ethernet uses the controller IP, serial uses the port parameters), enter online mode. In monitor state: ladder contacts show conduction by colour, variables can be forced by double-click — and forced outputs must be un-forced afterwards. Forcing outputs live is the operation most likely to cause an accident: keep a written list of every force and clear it all before handing over.
| Operation | Purpose | Caution |
|---|---|---|
| Build watch tables | Concentrate related variables on one screen | Group by process section, not one table for the whole machine |
| Force inputs | Simulate sensor signals to verify logic | Warn the floor first, put up a notice |
| Force outputs | Verify actuators one point at a time | Confirm mechanics are safe; log any bypassed interlock |
| Write setpoints | Change timers/parameters online | Keep temporary edits separate from permanent ones |
Keep temporary (commissioning) edits distinct from permanent (design) edits: after debugging, read the online changes back into the project and save, otherwise the next download reverts them and the field spends a day chasing a ghost.
To see "where the program has got to", set breakpoints: the program halts at the marked rung or ST line and steps line by line while variables are watched. Delete breakpoints when done — a program downloaded with breakpoints stops at them repeatedly. Note that some execution contexts (interrupts, high-speed tasks) do not support breakpoints; use variable-recording (sampling into arrays) instead there.
The oscilloscope samples a set of variables at a fixed period and draws curves. Four steps:
| Step | Action | Key point |
|---|---|---|
| 1. Pick variables | Add the relevant ones as channels | 4~8 at a time; more hides the story |
| 2. Set sampling period | Match the speed of the signals | Shortest period for servo loops, 100 ms for temperature |
| 3. Set trigger | Start recording on a limit crossing / edge | Trigger conditions are what catch sporadic problems |
| 4. Record and analyse | Reproduce the condition, export the curves | Look for overshoot, lag, oscillation, timing gaps |
Typical uses: PID temperature tuning — watch setpoint, measurement and output on one screen: oscillation means reduce gain, slow climb means increase gain, saturated output calls for anti-windup; mechanism timing — check the interval between two motions against design; servo tuning — the follow error curve (command vs feedback position) is the direct measure of whether the gains are right.
For rare problems (a false alarm every few hours, momentary dropouts) use "pre-trigger": set the trigger on the fault signal's edge and configure the record window as 80% before / 20% after, so the captured curve includes what happened before the fault — the cause always lies before the event, and recording only afterwards is wasted effort. Pair it with a "black box" program structure (circular array recording slow variables) for cases the oscilloscope cannot reach.
① Build the watch tables before each session and store them in the project so they reload next time; ② screenshot key oscilloscope captures with dates and operating conditions in the filename — "what conditions were those parameters tuned under?" is answered by looking; ③ record old values before changing any parameter — trials must be reversible; losing the old value is worse than never tuning.
Online debugging is "making program state visible". The watch table shows instant state, the breakpoint shows the path, the oscilloscope shows the process over time. With the three tools plus logical reasoning, nearly every field problem locates to a specific variable at a specific moment — no guessing required.
Functions follow the Inovance AutoShop User's Manual (online debugging, Trace) and the AM Series PLC User's Manual; safety during debugging (managing forced outputs and bypassed interlocks) follows GB 5226.1 / IEC 60204-1 commissioning-mode provisions.
Three closing actions every session: release all forces, delete all breakpoints, read back and archive online changes. Make it a habit and you never pay for "who changed that last time?".