en-us_products:mpino_studio2:monitoring

MPINO STUDIO 2 Phase 6 · Serial and Ladder Monitoring

This page explains how to view data sent and received by Arduino Code in the Serial Monitor and how to inspect contact, coil, memory, and power-flow states with ladder monitoring.

Two monitoring paths for Arduino Code serial data and ladder-logic states

1. Serial and Ladder Monitoring

The two monitors show different kinds of data.

What you need to inspect Feature What the screen shows
Output from Serial.print() and data sent from the PC Serial Monitor Text or HEX bytes
Ladder contacts, coils, memory, and power flow Ladder monitoring ON/OFF states, live values, and energized color

Use the Serial Monitor to inspect data exchanged by Arduino Code through a board serial port. Use ladder monitoring to inspect the internal state of the ladder logic running on the board.

2. Connect the Serial Monitor

  1. Choose the PC serial port under Select port at the right of the status bar.
  2. Select Serial Monitor on the Activity Bar, or open the Serial Monitor tab in the bottom panel.
  3. Select the same baud rate used by Serial.begin() in Arduino Code.
  4. Select the receive encoding, then choose Connect.
  5. Confirm that the state changes to Connected.

Serial Monitor marked with the target port, baud rate, encoding, and Connect button

  • 1 Target port: The PC serial port selected on the status bar.
  • 2 Baud rate: Select the value used by Serial.begin().
  • 3 Encoding: Select how received bytes are decoded as text.
  • 4 Connect: Connect, disconnect, and check the reconnecting state.

The receive encodings are UTF-8, EUC-KR (Korean), Shift-JIS (Japanese), Latin-1 (ISO-8859-1), and Windows-1252. The default is UTF-8. Encoding affects received data in ASCII view only; it does not affect HEX view or transmitted data.

Changing the baud rate while connected does not update the active connection. Select Disconnect, then connect again. If the selected rate differs from Serial.begin(), text may be garbled or no data may appear.

3. Receive and Send Data

The following code sends a counter value once per second and resets it to zero when the PC sends R or r.

unsigned long previousMillis = 0;
int count = 0;
 
void setup() {
  Serial.begin(9600);  // Set the Serial Monitor to 9600 baud as well.
  Serial.println("Counter ready. Send R to reset.");
}
 
void loop() {
  if (millis() - previousMillis >= 1000) {  // Send a value once per second.
    previousMillis = millis();
    count++;
    Serial.print("count = ");
    Serial.println(count);
  }
 
  if (Serial.available() > 0) {  // Read data received from the PC.
    char received = Serial.read();
    if (received == 'R' || received == 'r') {
      count = 0;
      Serial.println("-- reset --");
    }
  }
}

Build and upload the code, then connect the Serial Monitor at 9600 baud. count = 1, count = 2, and later values appear once per second. Enter R and press Enter or Send to see > R followed by the board response – reset –.

Serial Monitor receiving counter values, sending R, and receiving the reset response

ASCII and HEX Views

ASCII view decodes received bytes as text with the selected encoding. HEX view shows the same data as two-digit uppercase bytes separated by spaces, such as 41 42 0D 0A.

The same serial data displayed as ASCII text and HEX bytes

Switching the view clears the previous receive buffer and begins displaying data in the new mode. The button names the mode you will switch to, rather than the current mode.

Line Endings

Use the selector beside the input field to choose the bytes appended to transmitted data.

Selection Appended bytes Use when
None (no LE) None Send only the entered data
Newline (LF) 0A The code waits for \n
Carriage Return (CR) 0D The code waits for \r
Both NL & CR (CRLF) 0D 0A The code waits for \r\n

Bytes appended by None, LF, CR, and CRLF line-ending settings

Text entered in ASCII view is always transmitted as UTF-8. In HEX view, enter raw bytes such as 52 or 52 0D 0A. 520D0A without spaces is also accepted. Input containing a non-hexadecimal character or an odd number of digits is not sent.

Copy copies the entire current receive buffer to the clipboard. Clear empties the displayed buffer without disconnecting.

4. Configure Ladder Monitoring

The project sends ladder-monitoring data through the selected board communication channel. Select the channel first, then rebuild and upload the project to apply the change to the board.

Monitoring port selection followed by build, upload, and monitoring

  1. Open File → Preferences → Ladder Settings → Monitoring Port.
  2. Select the board communication channel connected to the PC.
  3. Build and upload the project again.
  4. Select the corresponding PC serial port on the status bar.

Selecting the Monitoring port under Ladder Settings

Only channels available on the selected board appear in the list. Selecting Off prevents the firmware from generating ladder-monitoring data. The available Serial, Serial1, and Serial2 entries follow the communication channels defined for the selected board. MPINO-8A4R(T)-S shows Off, Serial, and Serial1.

If you start monitoring after changing the channel but before uploading, an upload notice appears. Select Upload to apply the new channel to the board.

Notice that the monitoring channel change requires an upload

Port conflict: Monitoring data conflicts with project communication or Arduino Code that uses the same board channel. If a conflict notice appears, select a dedicated monitoring channel or change the communication settings and code using that channel.

The channel selector to the left of the Monitoring button in the Serial Monitor header changes the same Monitoring port setting. A change made in one place also appears in the other, and in both places the new channel takes effect on the board only after an upload. The selector cannot be changed while ladder monitoring is on or while an upload is running.

5. Start and Stop Ladder Monitoring

After setting the port and uploading, start or stop ladder monitoring in any of these ways:

  • The Monitoring button in the Serial Monitor header
  • Monitoring ON or Monitoring OFF on the ladder context menu
  • Ctrl + M

Three ways to toggle monitoring: the Serial Monitor button, ladder context menu, and Ctrl M

Shortcuts can be changed under File → Preferences → Keyboard Shortcuts.

If Monitoring port is Off, the Monitoring Port Required notice opens. Select Open Preferences and complete the settings in section 4.

Notice shown when no monitoring port is configured

If no PC serial port is selected, choose one on the status bar and start monitoring again. When monitoring starts, the button and context-menu state change to ON. Stopping monitoring closes the connection and removes live indications from the ladder.

6. Read Ladder States

While monitoring is on, the ladder shows both power flow and live cell values.

Ladder monitoring marked with box-function, word, timer, and comparison values

Cell type What to inspect
Bit contact or coil Yellow power-flow indication and ON/OFF state
Box function Live value of the target address inside the box
Word memory Numeric live value below the cell
Timer or counter contact Energized state of the done condition
Comparison contact Live values on both sides and the comparison result
Address entered in an empty cell ON/OFF for a bit address or the live numeric value
  • 1 Box-function value: Inspect the live timer, counter, or calculation target inside the box.
  • 2 Word value: Inspect D, C, T, and similar values below the cell.
  • 3 Timer value: Inspect a timer address in time units or as a number.
  • 4 Comparison values: The live operands appear below the contact, and power flow shows the comparison result.

If the board stops or the connection is lost, the last received values and power-flow indication may remain on screen. The time-driven @F special bit stops flashing in this state. When values stop changing, check the monitoring connection first.

7. Display Formats

Right-click a ladder cell to select the format used for live numeric values. A check mark identifies the selected format.

One 16-bit value displayed in five number formats

Format Interpretation
Signed Decimal Display the value as a signed decimal number for its data type
Unsigned Decimal Interpret an integer bit pattern as an unsigned decimal number
Hexdecimal Display the bit pattern as hexadecimal beginning with 0x
Binary Display the bit pattern as binary beginning with 0b
Floating Point Interpret a 16-bit integer as half precision or a 32-bit integer as single precision

The image compares one 16-bit value. A 32-bit value uses eight digits in Hexdecimal and 32 digits in Binary. R memory is displayed from its stored 32-bit floating-point value.

The format is a global setting for all projects on this PC, rather than a setting for one cell or project. It persists after restarting the application. The default is Signed Decimal.

Timer Live Values

When a timer preset uses time syntax such as TON T0 1m10s, Signed Decimal displays the live value with time units such as 1m10s, 43s210ms, or 500ms. A numeric preset produces a numeric live value.

Comparison of timer live values for a numeric preset and a time-syntax preset

Selecting a format other than Signed Decimal displays the timer value in that number format instead of time syntax. Counter presets do not use time units.

Comparison Contact Values

During monitoring, a comparison such as D0 > D1 shows live operands such as 5 > 3 below the contact. Binary values wrap onto multiple lines; the other formats use one line.

Single-line comparison values and wrapped Binary comparison values

8. Port Sharing

The Serial Monitor and ladder monitoring share the one PC serial port selected on the status bar, so they cannot be connected at the same time.

Port ownership transitions between the Serial Monitor and ladder monitoring

Current state Action Result
Serial Monitor connected Start ladder monitoring Disconnects the Serial Monitor and starts ladder monitoring at 115200 baud.
Ladder monitoring active Connect the Serial Monitor Stops ladder monitoring and connects the Serial Monitor at the selected baud.
Ladder monitoring active Send data The transmit input is disabled.
Serial Monitor connected Start an upload Disconnects temporarily and reconnects to the same port and baud after the upload.
Ladder monitoring active Start an upload Stops monitoring temporarily and reconnects after the upload.

The baud selected in the Serial Monitor remains unchanged while ladder monitoring connects at 115200 baud. The saved value is used when you reconnect the regular Serial Monitor.

If the board is disconnected, the regular Serial Monitor attempts to reconnect up to five times. After a successful reconnect, a reconnect notice is added to the receive buffer. If automatic attempts end without a connection, check the port list and cable, then reconnect manually. If ladder-monitoring values stop, do not wait for an automatic recovery; turn monitoring off and on again.

An upload disconnects the active owner first and restores the previous Serial Monitor or ladder-monitoring connection after the upload, whether it succeeds or fails. If neither feature was connected, both remain off. Running a build without uploading does not disconnect them.

During ladder monitoring, Serial.print() output on the same channel at 115200 baud can still appear in the Serial Monitor receive view. Because user data can mix with monitoring frames, use separate channels for Arduino Code communication and ladder monitoring whenever possible.

9. Comm Trace

The comm trace keeps the frames that the board sent and received in board RAM, for each channel that has a protocol selected in Communication Settings. MPINO Studio 2 receives the records over the ladder-monitoring port, and you can view them line by line in the Serial Monitor. Each line shows the bytes and the decoded frame, and an error also appears when the CRC is wrong or no response arrives.

Protocol Frames kept in the trace
Modbus RTU Slave, LS Electric Cnet Slave Requests received to the end of the frame (before the station number and the check value are verified) and the responses sent. Requests to other stations, other slaves' responses, and requests with a wrong check value (CRC for Modbus, BCC for LS Electric Cnet) are also kept.
Modbus RTU Master Requests sent, responses received, failures (the received bytes and the result code), and no-response events
MPLINK Master, MPLINK Slave Frames addressed to this board with a good CRC, and frames sent

Channels set to None and data that Arduino Code exchanges with Serial1.write(), Serial1.read(), and similar calls are not recorded. Bytes that the board discarded without receiving them as a frame are not shown either, so the comm trace is not the same as watching the whole line with an RS-485 converter connected to the PC.

Turn On the Comm Trace

When you select a protocol for a channel in Run → Communication, a Comm trace row appears under that channel. Select the Comm trace check box, then choose a Mode and a Size.

Comm trace mode and size turned on per channel in Communication Settings

Marker Item Setting
① Comm trace Turns this channel's comm trace on or off
② Mode Loop or Trigger
③ Size 64, 128, 256, 512, 1024, or 2048 B
④ Mode hint and extra RAM What the selected mode does when the trace space is full, and the board RAM used by this channel's comm trace (trace space + 55 B of state)
Mode When the trace space is full When recording starts
Loop Overwrites the oldest records first and keeps the latest ones. Records continuously from the moment the board program starts.
Trigger Stops recording and does not keep later frames. Records from the beginning when the board program starts and when you select Capture again.

Turning the comm trace on for the first time sets Loop and 256 B. On boards with 4 KB of RAM (MPINO-8A4R(T)-S, MPINO-8A4R-SU, MPINO-8A8R(T)-S, and MPINO-16A16R), only 64 B and 128 B can be selected, and turning the comm trace on sets 128 B.

Comm trace settings update the current project immediately and are applied to the board from the next build and upload. Each channel is turned on separately, and changing a channel's protocol to None also deletes its comm trace settings. A .mp2 file saved with the comm trace turned on does not open in earlier releases without the comm trace.

The build also checks the comm trace settings.

Situation Build result
Monitoring port is Off The project is built without the comm trace. A notice appears in the Problems panel.
The monitoring port is the same port as a channel with the comm trace on A build error appears.
The selected size cannot be used on this board A build error appears. After a board change, the Size box shows an entry such as 1024 B (not available on this board).
Not enough board RAM The error message in the build output shows the RAM used by the comm trace separately. Reduce the trace size or turn the comm trace off.

Select a comm trace item in the Problems panel to open the Communication Settings dialog.

Select Monitoring Channel

The comm trace reaches MPINO Studio 2 over the ladder-monitoring port, so it can be turned on only after the Monitoring port is set. If Monitoring port is Off or is the same port as the channel, the comm trace fields are locked and show the reason and Open monitoring port settings. If a comm trace that is already on becomes locked, Nothing is being recorded now. appears after the reason, and you can only turn the comm trace off.

Select monitoring channel dialog opened over Communication Settings, with locked comm trace fields

Marker Item Action
① Lock reason Shows why the comm trace cannot be turned on.
② Open monitoring port settings Opens the Select monitoring channel dialog over Communication Settings.
③ Select monitoring channel Selects the monitoring port from Off and the ports on the board.
④ ✕ Closes only this dialog and returns to Communication Settings.

When you select a port in the Select monitoring channel dialog, the project's monitoring port changes immediately and the locked fields in Communication Settings are unlocked. Pressing Esc or clicking outside the dialog also closes only this dialog. This selection is the same setting as File → Preferences → Ladder Settings → Monitoring port, and a change takes effect on the board only after an upload.

When Monitoring port is Serial, the comm trace can be turned on for every channel that has a protocol selected. If you select the port of a channel with the comm trace on as the monitoring port, a confirmation such as Serial2 comm trace will be turned off appears. Select Change and turn trace off to change the port and turn that channel's comm trace off, or Cancel to leave everything unchanged.

View the Comm Trace

In the Serial Monitor on the bottom panel, click Comm trace to the right of Monitoring to show the comm trace in place of the Serial Monitor receive view. Click it again to return to the Serial Monitor receive view.

Comm trace view that keeps received lines after the monitoring connection is turned off

Marker Item Action
① Comm trace Switches between the comm trace view and the Serial Monitor receive view.
② Notice band Shows why records cannot be received.
③ Traced channels Selects a channel with the comm trace on (CH1, CH2, or CH3).
④ Trace scope Shows the protocol of the selected channel and which frames are kept.
⑤ Byte display Shows bytes as Hex, ASCII, or Both.
⑥ Copy, Save, and Clear Copies or saves the trace lines on the screen, or clears them from the screen.
⑦ Trace line Shows one frame per line.
⑧ Comm trace status Shows the mode, how full the board's trace space is, and the number of dropped records.

If ladder monitoring is off, clicking Comm trace also turns ladder monitoring on. The monitoring-port notice and the upload notice are the same as for the Monitoring button. Ladder monitoring stays on even when you click Comm trace again to return to the Serial Monitor receive view.

While the comm trace is shown, the encoding selector, the ASCII and HEX switch, Copy, and Clear for the Serial Monitor receive view cannot be used. While ladder monitoring is on, records are collected even if the comm trace view is not open. Opening another project or creating a new project clears the received records.

The board keeps its records in board RAM, so even if you turn ladder monitoring on late or reconnect, you receive the records still left on the board at that time. Restarting the board or turning off its power clears the board's records.

Read Trace Lines

From left to right, a trace line shows the board time, the time since the previous line, the direction, the bytes, and the decoded frame in parentheses.

120.530 s  +489 ms  TX  01 06 00 01 00 03 98 0B  (Station 1 (Pump1, per project) · Write register (06) · Address 1 · Value 3)
120.542 s  +12 ms   RX  01 06 00 01 00 03 98 0B  (Station 1 (Pump1, per project) · Write register (06) · Address 1 · Value 3)
  • The board time is the time since the board started, at the moment the board processed the frame. It is not the PC time or the RTC time.
  • TX is a frame this board sent, and RX is a frame this board received. Modbus RTU Master failures and no-response events are also shown as RX lines.
  • For a station that has a name in the Modbus RTU Master device table, the decoded text includes the name, as in Station 1 (Pump1, per project).
  • Click a line to expand all of its bytes in rows of 16 bytes.
  • Up to 2000 lines are shown per channel; beyond that, the oldest lines are removed from the screen.

When a frame is correct, only the decoded text in parentheses is shown. When a frame is wrong, the decoded text turns red, and Error: with the details appears to its right.

Error shown Meaning
Error: CRC error — expected 2A 32, got 2A 33 The received CRC differs from the value calculated from the bytes. LS Electric Cnet shows BCC error.
Error: Exception 02 illegal address A Modbus exception response. An LS Electric Cnet error response shows a NAK code.
Error: No response Modbus RTU Master sent a request but received no response. The bytes column shows no bytes.
Error: Truncated (first 56/256 bytes) The frame was longer than one record can store, so only its beginning was kept.
Error: Not recognized The frame cannot be decoded in the protocol format.

A record that Modbus RTU Master judged as a failure has a Result code at the end of the error. The result codes are F1 (CRC error), F2 (malformed response), and F3 (the request could not be sent because the line was not idle); an exception response carries its exception code. On Modbus RTU Slave and LS Electric Cnet Slave channels, a request sent to another station is not an error, and the decoded text shows Other station (this board = 1).

The following separator lines can appear between trace lines.

Separator line Meaning
Connected The point where ladder monitoring connected and records started arriving.
Board restarted The point where the board restarted.
N record(s) (M bytes) dropped: board trace space full The number of records overwritten because the board's trace space filled before they were sent to MPINO Studio 2.
N record(s) lost in transfer The number of records the board sent that MPINO Studio 2 did not receive because the monitoring data was corrupted.

If the status line shows Traffic exceeds the transfer share — only part is shown, records have recently been dropped on the board.

Copy, Save, and Capture Again

  • Copy: Copies all screen lines of the selected channel to the clipboard. Hex and ASCII are both included regardless of the byte display, and the Board time (s), Since previous (ms), Direction, Hex, ASCII, Decoded, and Error columns are separated by tabs.
  • Save: Saves the screen lines of the selected channel to the file you choose in the Save comm trace dialog. The default file name is made from the project name, channel, and date and time, as in ProjectName_CH2_20261114-090000.txt. The top of the file records the project, board, channel settings, and save time.
  • Clear: Clears only the trace lines on the screen. The board's records are not cleared, and cleared lines do not appear again.
  • Capture again: Appears only for Trigger-mode channels. Select Capture again in the confirmation to erase that channel's records left on the board and its trace lines on the screen, and record again from the beginning. Select Save, then capture again to save the screen lines first and then capture again.

Copy and save results appear in the status line. If the board does not answer, the status line shows The board did not answer Capture again and Retry.

Caution: Board records and screen lines erased by Capture again cannot be recovered. Save any records you need first.

When No Records Appear

If a notice appears instead of trace lines, check the following.

Notice shown Action
No channel in this project has comm trace on Turn on Comm trace for a protocol channel in Communication Settings, then build and upload.
The monitoring port is set to “Not used” Select a monitoring port, then build and upload.
The monitoring port was changed and not uploaded yet Upload the project.
Monitoring is off Turn ladder monitoring on. Lines already received can still be copied and saved.
The board is not responding Check the port, cable, and board power.
The trace settings in the board's program differ from this project Check whether you uploaded after changing the comm trace settings, then upload the project.
No records yet Check that the other device is communicating on this channel.

10. Troubleshooting

Symptom What to check Action
Connect does not establish a connection. Status-bar port and current connection state Select the required PC serial port again and connect.
The board is missing from the port list. Cable, USB detection, and port list Reconnect the cable and reopen the port list.
Received text is garbled. Serial.begin() baud and receive encoding Select the same baud and match the firmware's character encoding.
No data is received. Connection, baud, and whether Serial.print() runs Check the Serial Monitor connection and the baud used by Serial.begin().
HEX transmission fails. Hexadecimal characters and an even digit count Enter AB CD 01 or ABCD01.
Ladder monitoring cannot start. Monitoring port and PC port on the status bar Set the port, rebuild and upload, then select the PC port.
Monitoring is on but no power flow or values appear. Upload after changing the port and the physical channel Rebuild and upload with the new setting, then check the connected channel.
Values stop changing and the last value remains. Board operation and monitoring connection Check board power and communication, then reconnect monitoring.
Serial.print() output is not visible. Channel, baud, and ladder-monitoring state Connect the regular Serial Monitor, or during ladder monitoring verify that the output uses the same channel at 115200 baud. Sharing the channel is not recommended because data can conflict.
A monitoring-port conflict notice appears. Communication settings and Arduino Code using the same channel Select a dedicated monitoring channel or change the settings and code using that channel.
en-us_products/mpino_studio2/monitoring.txt · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki