en-us_products:mp_studio:user_protocol

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en-us_products:mp_studio:user_protocol [2026/11/10 00:38] – created - external edit 127.0.0.1en-us_products:mp_studio:user_protocol [2026/11/12 20:37] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +MP STUDIO 2 · Communication · V1.3.0 and later
 +
 ====== MP STUDIO 2 · User Protocol ====== ====== MP STUDIO 2 · User Protocol ======
  
-The user protocol lets the PLC exchange data in byte layouts you define with devices that do not use Modbus, such as CO2 sensors, barcode and QR readers, inverters and temperature controllers that take ASCII commands, and numeric displays (V1.3.0 and later). In the **User Protocol** window, you define the layout of the bytes and when they are sent, and the PLC runs that communication together with the program. You do not have to handle bytes one at a time with ''PUT'' and ''GET'' in the ladder, and received values are stored in the memory you specify only after the whole frame, checksum included, matches.+The user protocol lets the PLC exchange data with devices that do not use Modbus, such as CO2 sensors, barcode and QR readers, inverters and temperature controllers that take ASCII commands, and numeric displays, in a byte format you define. In the **User Protocol** window, you define the format of the bytes and when they are sent, and the PLC runs that communication together with the program. You do not have to handle bytes one at a time with ''PUT'' and ''GET'' in the ladder, and received values are stored in the memory you specify only after the whole frame, checksum included, matches.
  
-  * **Frames and transactions:** You can build a frame by lining up the bytes to exchange as chips, and group the frame to send, the frames to wait for and the start condition into a transaction. +[[#examples|View examples]] [[#preparing_the_communication_port|Prepare the port]]
-  * **Four exchange patterns:** Ask & receive, Receive only, Answer on receive and Send only can be used together on one port. +
-  * **Starting from the ladder:** The ''UPTRIG'' function runs a transaction once at the moment you choose. You can check the result in the status word and the done bit. +
-  * **Checking tools:** MP STUDIO 2 provides a preview of the bytes to send, decoding of received bytes, a search for the matching checksum variant, a virtual device in simulation, status and a traffic log during monitoring, and a direct PC test that exchanges data with a device through a COM port on the PC without a PLC.+
  
-{{ :en-us_products:mp_studio:up-overview.svg?1000 |Figure 1. How the frames and transactions defined in the User Protocol window run on the PLC }}+{{ :en-us_products:mp_studio:up-hero.png?1600 |The whole User Protocol window, with the transaction list for each communication port, the field strips of the frames to send and receive, the preview and the properties }} 
 + 
 +^ Models ^ Communication ports ^ Version ^ 
 +| MPS and MPA series | Comm Port 1–3 | V1.3.0 and later | 
 + 
 +  * **Frames and transactions**\\ Build a frame from fixed-byte, value, text, length and checksum fields, and group the frame to send and the frames to wait for into a transaction. 
 +  * **Four communication types**\\ Request/response, Receive only, Respond on receive and Send only can be used together on one port. 
 +  * **Ladder triggers**\\ The ''UPTRIG'' function runs a transaction once at the moment you choose, and reports the result in the status word and the done bit. 
 +  * **Checking tools**\\ Preview the bytes to send and decode received bytes, find the matching checksum, test with a virtual device in simulation, follow the comm log during monitoring, or exchange bytes with a device from a PC COM port (PC test). 
 + 
 +**On this page** 
 +  * [[#supported_products_and_communication_ports|Supported Products and Communication Ports]] 
 +  * [[#how_it_works|How It Works]] 
 +  * [[#preparing_the_communication_port|Preparing the Communication Port]] 
 +  * [[#user_protocol_window|User Protocol Window]] 
 +  * [[#frames|Frames]] 
 +  * [[#transactions|Transactions]] 
 +  * [[#starting_from_the_ladder_uptrig|Starting from the Ladder (UPTRIG)]] 
 +  * [[#checks_and_warnings|Checks and Warnings]] 
 +  * [[#simulation|Simulation]] 
 +  * [[#monitoring|Monitoring]] 
 +  * [[#pc_test|PC Test]] 
 +  * [[#examples|Examples]] 
 +  * [[#troubleshooting|Troubleshooting]] 
 +  * [[#things_to_check|Things to Check]] 
 + 
 +~~NOTOC~~
  
 ===== Supported Products and Communication Ports ===== ===== Supported Products and Communication Ports =====
Line 22: Line 47:
   * The baud rate, data bits, parity and stop bits must match the device. You can also use 7 data bits (for example ''7-E-1''), which are common on ASCII devices.   * The baud rate, data bits, parity and stop bits must match the device. You can also use 7 data bits (for example ''7-E-1''), which are common on ASCII devices.
   * The PLC switches the RS-485 terminals between sending and receiving, so the ladder does not need to handle this.   * The PLC switches the RS-485 terminals between sending and receiving, so the ladder does not need to handle this.
-  * On the MPA series, running the 7-segment function ''FINI'' switches off Comm Port 3 (Serial 3); see [[:en-us_products:mp_studio:seven_segment#supported_products_and_connections|7-Segment Display]]. When you also use a 7-segment display, set the user protocol on Comm Port 1 or Comm Port 2.+ 
 +> **A 7-segment display turns off Comm Port 3 on the MPA** 
 +> On the MPA series, running the 7-segment function ''FINI'' turns off Comm Port 3 (Serial 3); see [[:en-us_products:mp_studio:seven_segment#supported_products_and_connections|7-Segment Display]]. When you also use a 7-segment display, set the user protocol on Comm Port 1 or Comm Port 2.
  
 ===== How It Works ===== ===== How It Works =====
Line 28: Line 55:
 The user protocol is defined for each communication port with **frames** and **transactions**. The user protocol is defined for each communication port with **frames** and **transactions**.
  
-  * **Frame:** The layout of one group of bytes that is sent or received. You build it by placing fields in order, such as fixed bytes, values from PLC memory, text, a length and a checksum. +  * **Frame:** The format of one group of bytes that is sent or received. You build it by placing fields in order ([[#frames|Frames]]). 
-  * **Transaction:** Defines which frame is sent when, and which frame is awaited. For each transaction, you can set the exchange pattern, the start condition, the reply timeout, the retries, and the status word and done bit that receive the result.+  * **Transaction:** Defines which frame is sent when, and which frame is awaited. For each transaction, you can set the communication type, the trigger, the response timeout, the retries, and the status word and done bit that receive the result ([[#transactions|Transactions]]). 
 + 
 +{{ :en-us_products:mp_studio:up-overview.svg?1000 |Figure 1. How the frames and transactions defined in the User Protocol window run on the PLC }} 
 + 
 +There are four communication types.
  
-^ Exchange pattern ^ Start ^ Behavior ^ Typical uses ^ +  * **Request/response**\\ Sends its Send frame and waits for a Receive frame.\\ Trigger: periodic, ladder ''UPTRIG'' or when a value changes\\ Typical uses: CO2 sensors, reading inverter status, temperature controllers 
-| **Ask & receive** | Period, ladder ''UPTRIG'' or value change | Sends a frame and waits for the reply frame. | CO2 sensors, reading inverter status, temperature controllers | +  * **Receive only**\\ Stores the values when a matching frame arrives. Sends nothing.\\ Trigger: always listening\\ Typical uses: barcode and QR readers, scales with continuous output 
-| **Receive only** | Always listening | Stores the values when a matching frame arrives. Sends nothing. | Barcode and QR readers, scales with continuous output | +  * **Respond on receive**\\ Sends the defined response frame as soon as a matching frame arrives.\\ Trigger: always listening\\ Typical uses: PC programs, HMIs without Modbus 
-| **Answer on receive** | Always listening | Sends the defined answer frame as soon as a matching frame arrives. | PC programs, HMIs without Modbus | +  * **Send only**\\ Sends its Send frame without waiting for a response.\\ Trigger: periodic, ladder ''UPTRIG'' or when a value changes\\ Typical uses: numeric displays, printers, setting commands
-| **Send only** | Period, ladder ''UPTRIG'' or value change | Sends a frame and does not wait for a reply. | Numeric displays, printers, setting commands |+
  
-{{ :en-us_products:mp_studio:up-shapes.svg?1000 |Figure 2. The order in which the PLC and the device exchange frames in the four exchange patterns }}+{{ :en-us_products:mp_studio:up-shapes.svg?1000 |Figure 2. The order in which the PLC and the device exchange frames in the four communication types }}
  
 On the PLC, the user protocol runs as follows. On the PLC, the user protocol runs as follows.
  
-  * Each communication port runs one transaction at a time. When several transactions are due, they run in turn in the order of the transaction list, and answers for Answer on receive transactions are sent first.+  * Each communication port runs one transaction at a time. When several transactions are due, they run in turn in the order of the transaction list, and responses for Respond on receive transactions are sent first.
   * Received bytes are stored in memory all at once, only after the whole frame matches. If the checksum or a value format does not match, none of the values in that frame are stored. The ladder reads the received values from the next scan on.   * Received bytes are stored in memory all at once, only after the whole frame matches. If the checksum or a value format does not match, none of the values in that frame are stored. The ladder reads the received values from the next scan on.
-  * If the received bytes match no frame, the first byte is dropped and matching starts again. Even if noise bytes come before a reply, the reply is received as long as a matching frame follows.+  * If the received bytes match no frame, the first byte is dropped and matching starts again. Even if noise bytes come before a response, the response is received as long as a matching frame follows.
   * The user protocol is downloaded to the PLC together with the program. Changes made in the window reach the PLC only after you click **OK** and download again.   * The user protocol is downloaded to the PLC together with the program. Changes made in the window reach the PLC only after you click **OK** and download again.
  
Line 50: Line 80:
 A serial channel used for the user protocol must be in ''User Protocol'' mode with **Use this channel for download** turned off. A serial channel used for the user protocol must be in ''User Protocol'' mode with **Use this channel for download** turned off.
  
-{{ :en-us_products:mp_studio:up-port-dialog.png?640 |Figure 3. The Communication Setting window with the mode of Serial 1 set to User Protocol }}+{{ :en-us_products:mp_studio:up-port-dialog.png?640 |Figure 3. The Communication Port window with the mode of Serial 1 set to User Protocol }}
  
-  - Select **Setting → Communication Port**, and on the tab of the serial channel you use (for example **Serial 1**), set the baud rate, data bits, parity and stop bits to match the device. To use a baud rate other than 115200, first turn off **Use this channel for download**.+  - Select **Settings → Communication Port**, and on the tab of the serial channel you use (for example **Serial 1**), set the baud rate, data bits, parity and stop bits to match the device. To use a baud rate other than 115200, first turn off **Use this channel for download**.
   - You can set the mode to ''User Protocol'' in this window or leave it as it is. When you click **OK** in the User Protocol window, a port in ''Normal'' mode changes to ''User Protocol'', and download on that port is turned off.   - You can set the mode to ''User Protocol'' in this window or leave it as it is. When you click **OK** in the User Protocol window, a port in ''Normal'' mode changes to ''User Protocol'', and download on that port is turned off.
  
   * A port set to any mode other than ''Normal'' (for example ''Modbus RTU Slave'') is not changed automatically. It changes only when you click **Switch to User Protocol**, which appears at the top of the User Protocol window.   * A port set to any mode other than ''Normal'' (for example ''Modbus RTU Slave'') is not changed automatically. It changes only when you click **Switch to User Protocol**, which appears at the top of the User Protocol window.
-  * A communication port used by the Modbus device table cannot also have a user protocol. If both read the receive buffer of one port, neither works, so move one of them to another communication port. 
   * A port whose user protocol you deleted returns to ''Normal'' mode when you click **OK**.   * A port whose user protocol you deleted returns to ''Normal'' mode when you click **OK**.
-  * Each item of the Communication Setting window is described in [[:en-us_products:mp_studio:download#communication_port|Phase 6 · Communication Port]].+  * Each item of the Communication Port window is described in [[:en-us_products:mp_studio:download#communication_port|Phase 6 · Communication Port]]. 
 + 
 +> **Sharing a port with the Modbus device table stops both** 
 +> A communication port used by the Modbus device table cannot also have a user protocol. If both read the receive buffer of one port, neither works, so move one of them to another communication port.
  
 ===== User Protocol Window ===== ===== User Protocol Window =====
Line 64: Line 96:
 ==== Opening the Window ==== ==== Opening the Window ====
  
-  * Select **Setting → User Protocol…** to open it. +  * Select **Settings → User Protocol…** to open it. 
-  * You can also open it with **Open user protocol** in the number cell of ''UPTRIG'' in the ladder ([[#starting_from_the_ladder_uptrig|see below]]). +  * You can also open it with **Open User Protocol** in the number cell of ''UPTRIG'' in the ladder ([[#starting_from_the_ladder_uptrig|see below]]). 
-  * When you click a cell used by the user protocol in the Inspector or the **Used Data** window, the window opens with the transaction, frame and field that use that cell selected.+  * When you click an address used by the user protocol in the Inspector or the **Used Data** window, the window opens with the transaction, frame and field that use that address selected.
  
-{{ :en-us_products:mp_studio:up-menu.png?480 |Figure 4. User Protocol… in the Setting menu }}+{{ :en-us_products:mp_studio:up-menu.png?480 |Figure 4. User Protocol… in the Settings menu }}
  
 You can edit the ladder while the window stays open. If a communication port has no definition, **+ Create on this port** and a list of templates are shown. You can edit the ladder while the window stays open. If a communication port has no definition, **+ Create on this port** and a list of templates are shown.
Line 75: Line 107:
  
 ^ Template ^ What it contains ^ ^ Template ^ What it contains ^
-| **CO2 / gas sensor — ask every second** | An Ask & receive transaction (1-second period) and a Send only transaction that sends the zero command with ''UPTRIG 3''. Binary value in ''D100'', two's complement sum checksum | +| **CO2 / gas sensor — poll every second** | A Request/response transaction (1-second period) and a Send only transaction that sends the zero command with ''UPTRIG 3''. Binary value in ''D100'', two's complement sum checksum | 
-| **CO2 / gas sensor — receive only (sensor communication example · the sensor sends by itself)** | A Receive only transaction that always listens for the same CO2 reply frame without sending a request |+| **CO2 / gas sensor — receive only (sensor communication example · the sensor sends on its own)** | A Receive only transaction that always listens for the same CO2 response frame without sending a request |
 | **Barcode / QR reader** | A Receive only transaction. Stores the text up to the end characters ''CR LF'' from ''D200'' and the number of characters in ''D190'' | | **Barcode / QR reader** | A Receive only transaction. Stores the text up to the end characters ''CR LF'' from ''D200'' and the number of characters in ''D190'' |
-| **Inverter / temperature controller (ASCII station commands)** | Ask & receive (0.5-second period). ASCII decimal and hex values, sum checksum (2 ASCII hex digits), NAK error reply |+| **Inverter / temperature controller (ASCII station commands)** | Request/response (0.5-second period). ASCII decimal and hex values, sum checksum (2 ASCII hex digits), NAK error response |
  
-You can freely change the template names and cells (''D100'', ''M100'' and so on) after adding a template. You can also add templates to a port that already has a definition with **+ Load from a template…**; if a name is already taken, a number is added to the end.+You can freely change the template names and addresses (''D100'', ''M100'' and so on) after adding a template. You can also add templates to a port that already has a definition with **+ Load from a template…**; if a name is already taken, a number is added to the end.
  
 ==== Window Layout ==== ==== Window Layout ====
  
-{{ :en-us_products:mp_studio:up-window-marked.svg?1000 |Figure 6. The User Protocol window (the Ask & receive transaction of the CO2 sensor template selected) }}+{{ :en-us_products:mp_studio:up-window-marked.svg?1000 |Figure 6. The User Protocol window (the Request/response transaction of the CO2 sensor template selected) }}
  
-  * **① Communication port tabs:** Choose the communication port to define. A port with a definition shows **User protocol** and its line settings (for example ''9600 · 8-N-1''). +  * **① Communication port tabs:** Choose the communication port to define. A port with a definition shows **User Protocol** and its port settings (for example ''9600 · 8-N-1''). 
-  * **② Views:** Choose **Definition**, **Direct PC test** or **Traffic log**. During simulation, **Simulated device** is added. Click **Line settings…** to open the Communication Setting window. +  * **② Views:** Choose **Definition**, **PC test** or **Comm log**. During simulation, **Virtual device** is added. Click **Port settings…** to open the Communication Port window. 
-  * **③ Transactions:** Each transaction card shows the name, the exchange pattern, the start condition, the frame to send → the frame to receive, and the status word and done bit. During monitoring, it also shows the last result. Click **+ Add transaction** and choose an exchange pattern to add a transaction. +  * **③ Transactions:** Each transaction card shows the name, the communication type, the trigger, the frame to send → the frame to receive, and the status word and done bit. During monitoring, it also shows the last result. Click **+ Add transaction** and choose a communication type to add a transaction. 
-  * **④ Frames:** The frame list of this port. Each frame shows **Send**, **Receive** or **unused** and its number of bytes. Add a frame with **+ Frame**; select a frame to use **Duplicate** and **Delete frame**. +  * **④ Frames:** The frame list of this port. Each frame shows **Send**, **Receive** or **Unused** and its number of bytes. Add a frame with **+ Frame**; select a frame to use **Duplicate** and **Delete frame**. 
-  * **⑤ Port settings:** Set **Gaps between characters are OK** ([[#gaps_between_characters_are_ok|see below]]) and **Comm log while monitoring** ([[#traffic_log|see below]]). **Clear port** deletes the whole definition of this port. +  * **⑤ Port options:** Turn **Allow gaps between characters** ([[#allow_gaps_between_characters|see below]]) and **Comm log while monitoring** ([[#comm_log|see below]]) on or off. **Clear port** deletes the whole definition of this port. 
-  * **⑥ Transaction settings:** Set the name, exchange pattern, start, reply timeout, retries, status word and done bit of the selected transaction ([[#transactions|Transactions]]). +  * **⑥ Transaction settings:** Set the name, communication type, trigger, response timeout, retries, status word and done bit of the selected transaction ([[#transactions|Transactions]]). 
-  * **⑦ Chip strips:** The frame the transaction sends (**Send**) and the frames it waits for (**Receive** and **Error reply**) are shown as chips ([[#frames|Frames]]).+  * **⑦ Field strips:** The frame the transaction sends (**Send**) and the frames it waits for (**Receive** and **Error response**) are shown as fields ([[#frames|Frames]]).
   * **⑧ Preview:** Shows the bytes to send in hex, and decodes received bytes that you paste ([[#preview_and_decoding_received_bytes|see below]]).   * **⑧ Preview:** Shows the bytes to send in hex, and decodes received bytes that you paste ([[#preview_and_decoding_received_bytes|see below]]).
-  * **⑨ Properties:** Edit the properties of the selected chip (field). When no chip is selected, a description of the transaction or frame is shown. +  * **⑨ Properties:** Edit the properties of the selected field. When no field is selected, a description of the transaction or frame is shown. 
-  * **⑩ RAM, flash and one exchange:** The RAM and flash of the PLC used by the user protocol (as a percentage of the user area), and the calculated transmission time for one exchange of the selected transaction. The transmission time does not include the scan time or the processing time of the device. RAM and flash are not shown while there are items to fix. +  * **⑩ RAM, flash and one exchange:** The RAM and flash of the PLC used by the user protocol (as a percentage of the user area), and the calculated transmission time for one exchange of the selected transaction. The transmission time does not include the scan time or the processing time of the device. RAM and flash are not shown while there are errors. 
-  * **⑪ Bottom bar:** Shows the numbers of ports, transactions and frames, and the number of items to fix. Click **OK** to put the definition into the project, or **Cancel** to discard your changes. Save the project to keep them in the file.+  * **⑪ Bottom bar:** Shows the numbers of ports, transactions and frames, and the number of errors. Click **OK** to put the definition into the project, or **Cancel** to discard your changes. Save the project to keep them in the file.
  
 ==== Shortcut Keys and Undo ==== ==== Shortcut Keys and Undo ====
Line 105: Line 137:
 | ''Ctrl+Z'' / ''Ctrl+Y'' | Undoes or redoes changes made in the window, one step at a time. When there is nothing left to undo, it goes on to Undo and Redo for the whole program. | | ''Ctrl+Z'' / ''Ctrl+Y'' | Undoes or redoes changes made in the window, one step at a time. When there is nothing left to undo, it goes on to Undo and Redo for the whole program. |
 | ''Ctrl+S'' | Saves the project. Changes made in the window are not saved until you click **OK**. | | ''Ctrl+S'' | Saves the project. Changes made in the window are not saved until you click **OK**. |
-| ''Ctrl+T'' / ''Ctrl+M'' | Download / monitoring | +| ''Ctrl+T'' / ''Ctrl+M'' | Download / Monitoring | 
-| ''←'' ''→'' · ''Alt+←'' ''Alt+→'' · ''Delete'' · ''Insert'' | In a chip strip: move between chips · move a chip · delete a chip · add a chip |+| ''←'' ''→'' · ''Alt+←'' ''Alt+→'' · ''Delete'' · ''Insert'' | In a field strip: move between fields · move a field · delete a field · add a field |
  
   * In a text box, ''Ctrl+Z'' undoes the typing in that box. Characters typed one after another in the same box are undone as one step.   * In a text box, ''Ctrl+Z'' undoes the typing in that box. Characters typed one after another in the same box are undone as one step.
Line 113: Line 145:
 ===== Frames ===== ===== Frames =====
  
-A frame is made of chips (fields) placed in byte order. The byte positions (counting from 1) are shown under the chips, and when you select a checksum chip, the range it covers is highlighted on the strip. Click **+** at the end of the chip strip and choose a field type to add a chip.+A frame is made of fields placed in order from the first byte. The byte positions (counting from 1) are shown under the fields, and when you select a checksum field, the range it covers is highlighted on the strip. Click **+** at the end of the field strip and choose a field type to add a field.
  
-{{ :en-us_products:mp_studio:up-add-chip.png?1000 |Figure 7. Choosing a field type with + on the chip strip }}+{{ :en-us_products:mp_studio:up-add-chip.png?1000 |Figure 7. Choosing a field type with + on the field strip }}
  
 ^ Field ^ When sending ^ When receiving ^ ^ Field ^ When sending ^ When receiving ^
-| **Fixed** | Sends the entered bytes as they are. | The frame matches only if the bytes are the same (the chip shows **Must match**). | +| **Fixed** | Sends the entered bytes as they are. | The frame matches only if the bytes are the same (the field shows **Must match**). | 
-| **Value** | Converts the value of a PLC cell into bytes in the set format and sends them. | Converts the bytes into a value and stores it in the PLC cell. | +| **Value** | Converts the value at a PLC address into bytes in the set format and sends them. | Converts the bytes into a value and stores it at the PLC address. | 
-| **Text** | Sends the characters in the PLC cells. | Stores the received characters in the PLC cells. The number of characters can be stored separately. |+| **Text** | Sends the characters at the PLC address. | Stores the received characters at the PLC address. The number of characters can be stored separately. |
 | **Skip** | Sends the set number of fill bytes. | Ignores the bytes at that position. | | **Skip** | Sends the set number of fill bytes. | Ignores the bytes at that position. |
-| **Length** | Sends the number of bytes in the specified fields. | Checks it against the actual number of bytes, and marks where a variable-length frame ends. | +| **Length** | Sends the number of bytes in the specified fields. | Checks it against the actual number of bytes, and sets where a variable-length frame ends. | 
-| **Checksum** | Calculates and inserts it. | Calculates it and compares (the chip shows **Checksum · checked**). If it is wrong, no value is stored. |+| **Checksum** | Calculates and inserts it. | Calculates and checks it (the field shows **Checksum · checked**). If it is wrong, no value is stored. |
  
-{{ :en-us_products:mp_studio:up-frame-bytes.svg?1000 |Figure 8. The fields and the checksum range of the 9-byte CO2 reply frame }}+{{ :en-us_products:mp_studio:up-frame-bytes.svg?1000 |Figure 8. The fields and the checksum range of the 9-byte CO2 response frame }}
  
 ==== Fixed Bytes ==== ==== Fixed Bytes ====
Line 137: Line 169:
 | Repeat (''*N'', 1 to 255) | ''00*5'' | ''00 00 00 00 00'' | | Repeat (''*N'', 1 to 255) | ''00*5'' | ''00 00 00 00 00'' |
  
-One chip can hold up to 255 bytes. Characters outside ASCII must be written in hex. ''FF'' is read as the hex byte 0xFF, not as the control character name for form feed.+One field can hold up to 255 bytes. Characters outside ASCII must be written in hex. ''FF'' is read as the hex byte 0xFF, not as the control character name for form feed.
  
 ==== Value ==== ==== Value ====
  
-In **PLC address**, enter the cell that exchanges the value (for example ''D100'') or a symbol name, and choose the **Format**.+In **PLC address**, enter the address whose value is sent or received (for example ''D100''), or a symbol name, and choose the **Format**.
  
-{{ :en-us_products:mp_studio:up-props-value.png?480 |Figure 9. Properties of a value field (binary, 2 bytes, big-endian) }}+{{ :en-us_products:mp_studio:up-props-value.png?480 |Figure 9. Properties of a value field (Binary, 2 bytes, Big-endian) }}
  
 ^ Format ^ Settings ^ Example ^ ^ Format ^ Settings ^ Example ^
-| **Binary** | Bytes (1, 2 or 4), order (big-endian or little-endian), sign (unsigned or signed) | 2 bytes, big-endian: ''01 9A'' ↔ 410 | +| **Binary** | Bytes (1, 2 or 4), byte order (Big-endian or Little-endian), sign (None or Signed) | 2 bytes, Big-endian: ''01 9A'' ↔ 410 | 
-| **ASCII decimal** | Digits (1 to 10; leave empty for a variable number), padding (zeros or spaces), sign (none, - for negative values only, or always +/-), decimal places (0 to 9), decimal point (not written or written) | 4 digits, zero-padded: 100 ↔ ''"0100"'' · 2 decimal places, point written: 1234 ↔ ''"12.34"'' | +| **ASCII decimal** | Digits (1 to 10; leave empty for a variable number), padding (Zeros or Spaces), sign (None, − for negatives only, or Always +/−), decimal places (0 to 9), decimal point (None or Insert) | 4 digits, zero-padded: 100 ↔ ''"0100"'' · 2 decimal places, point inserted: 1234 ↔ ''"12.34"'' | 
-| **ASCII hex** | Digits, letter case when sending (upper or lower) | 4 digits: 6699 ↔ ''"1A2B"'' | +| **ASCII hex** | Digits, letter case when sending (Uppercase or Lowercase) | 4 digits: 6699 ↔ ''"1A2B"'' | 
-| **BCD** | Bytes (1, 2 or 4), order | 2 bytes: 1234 ↔ ''12 34'' | +| **BCD** | Bytes (1, 2 or 4), byte order | 2 bytes: 1234 ↔ ''12 34'' | 
-| **REAL** | Order (4-byte real number) | Exchanged with real-number cells (such as ''R''). |+| **REAL** | Byte order (4-byte real number) | Exchanged with real-number addresses (such as ''R''). |
  
   * When ASCII decimal is received, leading and trailing spaces, ''+'' and ''-'', and fewer decimal places than set (''"12.3"'' → 1230) are accepted. If a non-digit character arrives, or more nonzero decimal places than set (''"12.345"''), nothing is stored and the status word becomes **Value conversion failed (F4)**. With a variable number of digits, 1 to 12 characters are accepted when receiving.   * When ASCII decimal is received, leading and trailing spaces, ''+'' and ''-'', and fewer decimal places than set (''"12.3"'' → 1230) are accepted. If a non-digit character arrives, or more nonzero decimal places than set (''"12.345"''), nothing is stored and the status word becomes **Value conversion failed (F4)**. With a variable number of digits, 1 to 12 characters are accepted when receiving.
-  * If a received value is too large for the PLC cell, nothing is stored and the status becomes F4. The chip shows a warning when the settings allow this. +  * If a received value is too large for the PLC address, nothing is stored and the status becomes F4. The field shows a warning when the settings allow this. 
-  * With 7 data bits, bytes above ''0x7F'' lose their top bit. On a port with 7 data bits, a chip with a binary value or with a fixed byte above ''0x7F'' turns red.+  * With 7 data bits, bytes above ''0x7F'' lose their top bit. On a port with 7 data bits, a field with a binary value or with a fixed byte above ''0x7F'' turns red.
  
 ==== Text ==== ==== Text ====
  
-  * Starting at **PLC address (first cell)**, the characters are stored two to a word, low byte first (the low byte of ''D200'' = the first character). +  * Starting at **PLC address (first word)**, the characters are stored two per word, low byte first (the low byte of ''D200'' = the first character). 
-  * **Length:** **up to the end character · at most N** receives up to N characters, until the fixed field that follows (for example ''CR LF'') arrives. **always N characters** always takes exactly N characters. N is 1 to 255. +  * **Length:** **Until terminator · max N** receives up to N characters, until the fixed field that follows (for example ''CR LF'') arrives. **Fixed N characters** always takes exactly N characters. N is 1 to 255. 
-  * Enter a word address in **Cell for the received length** to store the number of characters received. **Fill for unused places (hex)** is the byte that fills the remaining places when the text is shorter than N characters.+  * Enter a word address in **Received length address** to store the number of characters received. **Pad byte (hex)** is the byte that fills the remaining places when the text is shorter than N characters.
  
 ==== Length ==== ==== Length ====
  
-Set the **Format** (1-byte binary, 2-byte binary, ASCII decimal or ASCII hex) and the **Counted range** (from one field number to another). When sending, the number of bytes in that range is inserted; when receiving, it is checked against the actual number of bytes. If the device adds a fixed number to the byte count, enter that number in **Adjustment (added)**.+Set the **Format** (binary 1 byte, binary 2 bytes, ASCII decimal or ASCII hex) and the **Counted range** (from one field number to another). When sending, the number of bytes in that range is inserted; when receiving, it is checked against the actual number of bytes. If the device adds a fixed number to the byte count, enter that number in **Offset (added)**.
  
 ==== Checksum ==== ==== Checksum ====
  
 ^ Type ^ Calculation ^ ^ Type ^ Calculation ^
-| **Sum (8 bit)** · **Sum (16 bit)** | The lower 8 or 16 bits of the sum of the bytes in the range |+| **Sum (8-bit)** · **Sum (16-bit)** | The lower 8 or 16 bits of the sum of the bytes in the range |
 | **Two's complement sum** | The two's complement of the byte sum (the sum subtracted from 0x100) | | **Two's complement sum** | The two's complement of the byte sum (the sum subtracted from 0x100) |
 | **One's complement sum** | The byte sum with all bits inverted | | **One's complement sum** | The byte sum with all bits inverted |
 | **XOR (BCC)** | The XOR of the bytes in the range | | **XOR (BCC)** | The XOR of the bytes in the range |
-| **CRC-16** | One of the variants below, or custom values |+| **CRC-16** | One of the algorithms below, or custom values |
 | **LRC** | The two's complement of the sum of the bytes made from the ASCII hex characters in the range, two characters per byte (the Modbus ASCII method) | | **LRC** | The two's complement of the sum of the bytes made from the ASCII hex characters in the range, two characters per byte (the Modbus ASCII method) |
  
-  * **Range start:** Choose **from byte 1** or **from byte 2**, or enter the byte number to start from. For a device that leaves the header byte (such as STX) out of the calculation, choose **from byte 2**. +  * **Start at:** Choose **Byte 1** or **Byte 2**, or enter the byte number to start from. For a device that leaves the header byte (such as STX) out of the calculation, choose **Byte 2**. 
-  * **Range end:** The default is **up to just before the checksum**. Frames with end characters after the checksum can also keep this default. +  * **End at:** The default is **just before the checksum**. Frames with end characters after the checksum can also keep this default. 
-  * **Layout:** 1 byte, 2 bytes (big-endian or little-endian), or 2 or 4 ASCII hex digits. For ASCII hex, you can choose upper or lower case for sending; case is ignored when receiving.+  * **Format:** 1 byte, 2 bytes (Big-endian or Little-endian), or 2 or 4 ASCII hex digits. For ASCII hex, you can choose Uppercase or Lowercase for sending; case is ignored when receiving.
  
-CRC-16 is calculated differently from device to device. When you choose a **CRC-16 variant**, the five boxes for the polynomial, initial value, reflect in, reflect out and final XOR are filled in, and the check value calculated from the string ''"123456789"'' is shown. Choose the variant whose check value matches the check value in the device manual. If you change any of the five boxes, the variant becomes **Custom**.+CRC-16 is calculated differently from device to device. When you choose a **CRC-16 algorithm**, the five values (polynomial, initial value, reflect input, reflect output and final XOR) are filled in, and the check value calculated from the string ''"123456789"'' is shown. Choose the algorithm whose check value matches the check value in the device manual. If you change any of the five values, the algorithm becomes **Custom**.
  
-{{ :en-us_products:mp_studio:up-checksum-crc.png?480 |Figure 10. The list of CRC-16 variants in the checksum properties }}+{{ :en-us_products:mp_studio:up-checksum-crc.png?480 |Figure 10. The list of CRC-16 algorithms in the checksum properties }}
  
-^ Variant ^ Polynomial ^ Initial value ^ Reflect (in, out) ^ Final XOR ^ Check value ^+^ Algorithm ^ Polynomial ^ Initial value ^ Reflect (input, output) ^ Final XOR ^ Check value ^
 | MODBUS | 8005 | FFFF | Yes | 0000 | 4B37 | | MODBUS | 8005 | FFFF | Yes | 0000 | 4B37 |
 | CCITT-FALSE | 1021 | FFFF | No | 0000 | 29B1 | | CCITT-FALSE | 1021 | FFFF | No | 0000 | 29B1 |
Line 194: Line 226:
 | DNP | 3D65 | 0000 | Yes | FFFF | EA82 | | DNP | 3D65 | 0000 | Yes | FFFF | EA82 |
  
-The default layout is little-endian for MODBUS and big-endian for every other variant.+The default format is Little-endian for MODBUS and Big-endian for every other algorithm.
  
 ==== End of a Received Frame ==== ==== End of a Received Frame ====
  
-Where a received frame ends follows from the layout of the frame, and is shown above the chip strip as **end: …**.+The end of a received frame is set by the frame's format and is shown above the field strip as **end: …**.
  
 ^ Shown as ^ What sets the end ^ ^ Shown as ^ What sets the end ^
 | **end: fixed length N** | Every field of the frame has a set length. | | **end: fixed length N** | Every field of the frame has a set length. |
 | **end: length field (field N)** | The value of a length field earlier in the frame | | **end: length field (field N)** | The value of a length field earlier in the frame |
-| **end: end characters …** | The fixed bytes right after a variable-length field (for example ''CR LF'' or ''ETX'') | +| **end: terminator …** | The fixed bytes right after a variable-length field (for example ''CR LF'' or ''ETX'') | 
-| **end: after N ms of quiet** | No byte arrives for the **End quiet time (ms)** of the frame. | +| **end: after N ms idle** | No byte arrives for the **End-of-frame idle (ms)** time. | 
-| **end: unknown** | The end cannot be determined, so it is shown as an item to fix. |+| **end: unknown** | The end cannot be determined, so it is shown as an error. |
  
-**End quiet time (ms)** appears in the properties on the right when you select a frame, and can be set from 20 to 10000 ms (leave it empty to not use it). A last field of unknown length is treated as finished when the line stays quiet for this time. When partly received bytes are left and the line stays quiet for 100 ms or more, those bytes are also dropped from the front.+**End-of-frame idle (ms)** appears in the properties on the right when you select a frame, and can be set from 20 to 10000 ms (leave it empty to not use it). A last field of unknown length is treated as finished when nothing is received for this time. When partly received bytes are left and nothing is received for 100 ms or more, those bytes are also dropped from the front.
  
 {{ :en-us_products:mp_studio:up-end-detect.svg?1000 |Figure 11. Four ways to find the end of a received frame, and matching again by shifting one byte }} {{ :en-us_products:mp_studio:up-end-detect.svg?1000 |Figure 11. Four ways to find the end of a received frame, and matching again by shifting one byte }}
Line 213: Line 245:
 ==== Preview and Decoding Received Bytes ==== ==== Preview and Decoding Received Bytes ====
  
-The preview at the bottom of the window shows the bytes of the frame to send in hex (value cells as 0, length and checksum as calculated). Paste the bytes the device sent into the box below, one frame per line, and they are decoded as the frame to receive, with the value and result shown for each field. You can use both hex (''FF 86 01'') and fixed-byte notation such as ''STX "01" ETX''.+The preview shows the bytes of the frame to send in hex (value fields as 0, length and checksum as calculated). Paste the bytes the device sent into the box below, one frame per line, and they are decoded as the frame to receive, with the value and result shown for each field. You can use both hex (''FF 86 01'') and fixed-byte notation such as ''STX "01" ETX''.
  
-{{ :en-us_products:mp_studio:up-preview.png?1000 |Figure 12. CO2 reply bytes pasted and decoded as D100 = 410 }}+{{ :en-us_products:mp_studio:up-preview.png?1000 |Figure 12. CO2 response bytes pasted and decoded as D100 = 410 }}
  
 ^ Result ^ Meaning ^ ^ Result ^ Meaning ^
 | **✓ …** | The fixed bytes, length and checksum all match. After ✓, the value to be stored is shown for each field (Figure 12). A frame with no value fields shows **this frame matches**. | | **✓ …** | The fixed bytes, length and checksum all match. After ✓, the value to be stored is shown for each field (Figure 12). A frame with no value fields shows **this frame matches**. |
 | **… incomplete** | More bytes must arrive before the frame ends. | | **… incomplete** | More bytes must arrive before the frame ends. |
-| **✕ … byte … differs from the fixed bytes** | The bytes do not belong to this frame. |+| **✕ … — byte N differs from the fixed bytes** | The bytes do not belong to this frame. |
 | **✕ checksum — expected …** | The checksum is wrong. The calculated value is shown with it. | | **✕ checksum — expected …** | The checksum is wrong. The calculated value is shown with it. |
-| **✕ … cannot be converted to a value** | The data is not a number or does not fit the cell. |+| **✕ … — cannot be converted to a value** | The data is not a number or does not fit the address. |
  
-=== Finding the Matching Checksum Variant ===+=== Finding the Matching Checksum ===
  
-Use this when the device manual does not describe the checksum method or the check value does not match. Paste two or more frames that the device actually sent. When the checksum does not match, MP STUDIO 2 automatically tries each checksum type, CRC-16 variant, layout and range start, and lists the combinations that fit every sample on the **Find the matching variant** line, each with a **Change to "…"** button. With only one sample, a combination can match by chance, so **Change to "…"** is enabled only when there are two or more samples. The change goes into the definition only when you click **OK**.+Use this when the device manual does not describe the checksum method or the check value does not match. Paste two or more frames that the device actually sent. When the checksum does not match, MP STUDIO 2 automatically tries each checksum type, CRC-16 algorithm, format and range start, and lists the combinations that fit every sample on the **Find matching checksum** line, each with a **Change to "…"** button. With only one sample, a combination can match by chance, so **Change to "…"** is enabled only when there are two or more samples. The change goes into the definition only when you click **OK**.
  
 {{ :en-us_products:mp_studio:up-sumfind.png?1000 |Figure 13. "Two's complement sum · from byte 2" found from two samples }} {{ :en-us_products:mp_studio:up-sumfind.png?1000 |Figure 13. "Two's complement sum · from byte 2" found from two samples }}
Line 232: Line 264:
 ===== Transactions ===== ===== Transactions =====
  
-When you select a transaction in the transaction list, its settings appear at the top center, with the chip strips of the frame to send and the frame to receive below them.+When you select a transaction in the transaction list, its settings appear at the top center, with the field strips of the frame to send and the frame to receive below them.
  
-{{ :en-us_products:mp_studio:up-tx-form.png?1000 |Figure 14. An ASCII station read transaction — the frame to send, the frame to receive and the error reply (NAK) }}+{{ :en-us_products:mp_studio:up-tx-form.png?1000 |Figure 14. An ASCII station read transaction — the frame to send, the frame to receive and the error response (NAK) }}
  
 ^ Item ^ Default ^ Description ^ ^ Item ^ Default ^ Description ^
-| Name | Exchange pattern name | The name of the transaction. It must be unique within the port. | +| Name | Communication type name | The name of the transaction. It must be unique within the port. | 
-| Exchange pattern | — | **Ask & receive**, **Receive only**, **Answer on receive** or **Send only** | +| Communication type | — | **Request/response**, **Receive only**, **Respond on receive** or **Send only** | 
-| Start | Period | Ask & receive and Send only: **Period**, **Ladder UPTRIG number** or **When a value changes** · Receive only and Answer on receive: **always listening** |+| Trigger | Periodic | Request/response and Send only: **Periodic**, **Ladder UPTRIG number** or **When a value changes** · Receive only and Respond on receive: **always listening** |
 | Period (ms) | 1000 | 10 ms to 1 hour, counted from the previous start | | Period (ms) | 1000 | 10 ms to 1 hour, counted from the previous start |
 | Number | 1 | The ''UPTRIG'' number in the ladder (1 to 255) | | Number | 1 | The ''UPTRIG'' number in the ladder (1 to 255) |
-| Watched cell · Cells | — | When a value changes: sends when any of the values in the given number of cells (1 to 32), starting at the watched cell, changes. Also sends once when the PLC starts. | +| Watch address · Words | — | When a value changes: sends when any value in the given number of words (1 to 32), starting at the watch address, changes. Also sends once when the PLC starts. | 
-| Reply timeout (ms) | 200 | How long Ask & receive waits for a reply (20 to 60000 ms) | +| Timeout (ms) | 200 | How long Request/response waits for a response (20 to 60000 ms) | 
-| Retries | 2 | How many times to send again when there is no reply or only wrong replies arrive (0 to 10) |+| Retries | 2 | How many times to send again when there is no response or only wrong responses arrive (0 to 10) |
 | Status word | Empty (not used) | The word address that receives the result of the transaction ([[#status_word|see below]]) | | Status word | Empty (not used) | The word address that receives the result of the transaction ([[#status_word|see below]]) |
 | Done bit | Empty (not used) | The bit address that turns on for one scan when the transaction ends | | Done bit | Empty (not used) | The bit address that turns on for one scan when the transaction ends |
-| Received-count cell | Empty (not used) | Receive only and Answer on receive: a word address that increases by 1 each time a matching frame is received (65535 rolls over to 0) |+| Receive counter | Empty (not used) | Receive only and Respond on receive: a word address that increases by 1 each time a matching frame is received (65535 rolls over to 0) |
  
-  * Choose the frame to send and the frame to receive from the list at the head of each chip strip. Choosing **+ New frame** creates an empty frame. You can set two or more frames to receive with **+ Frame to receive**. +  * Choose the frame to send and the frame to receive from the list at the head of each field strip. Choosing **+ New frame** creates an empty frame. You can set two or more frames to receive with **+ Receive frame**. 
-  * In Ask & receive, you can define the device's error reply frame with **+ Error reply (NAK, etc.)**. When an error reply is received, the transaction ends with **Error reply (F6)**. +  * In Request/response, you can define the device's error response frame with **+ Error response (NAK, etc.)**. When an error response is received, the transaction ends with **Error response (F6)**. 
-  * In Answer on receive, the **Send** frame is the answer. The values in the answer are read from PLC cells.+  * In Respond on receive, the **Send** frame is the response. The values in the response are read from PLC addresses.
  
-==== Behavior by Exchange Pattern ====+==== Behavior by Communication Type ====
  
-  * **Ask & receive:** The transaction succeeds if a frame to receive arrives within the reply timeout after sending. If there is no reply, or only wrong replies arrive, the request is sent again after the full reply timeout, and the transaction fails once all retries are used. If the device sends only wrong replies, one transaction takes "reply timeout × (retries + 1)". When an error reply arrives, the transaction ends at once without sending again.+  * **Request/response:** The transaction succeeds if a frame to receive arrives within the response timeout after sending. If there is no response, or only wrong responses arrive, the request is sent again after the full response timeout, and the transaction fails once all retries are used. If the device sends only wrong responses, one transaction takes "timeout × (retries + 1)". When an error response arrives, the transaction ends at once without sending again.
   * **Send only:** The transaction ends successfully when the whole frame has been sent.   * **Send only:** The transaction ends successfully when the whole frame has been sent.
-  * **Receive only:** In the scan in which a matching frame is received, the values are stored, success is written to the status word, the done bit turns on for one scan, and the received-count cell increases by 1. +  * **Receive only:** In the scan in which a matching frame is received, the values are stored, success is written to the status word, the done bit turns on for one scan, and the receive counter increases by 1. 
-  * **Answer on receive:** The values are stored as in Receive only, and the answer frame is sent at once. If the received frame does not match (different header bytes or a wrong checksum), no answer is sent.+  * **Respond on receive:** The values are stored as in Receive only, and the response frame is sent at once. If the received frame does not match (different header bytes or a wrong checksum), no response is sent.
  
 ==== Status Word ==== ==== Status Word ====
Line 265: Line 297:
  
 ^ Value (hex) ^ Shown as ^ Meaning ^ ^ Value (hex) ^ Shown as ^ Meaning ^
-| ''0000'' | **Never succeeded yet** | This transaction has not finished even once since the PLC was turned on. The value is also 0 when this definition is not in the program on the PLC. |+| ''0000'' | **No successful run yet** | This transaction has not finished even once since the PLC was turned on. The value is also 0 when this definition is not in the program on the PLC. |
 | ''0001'' | **Last transaction succeeded** | The last transaction finished without an error. | | ''0001'' | **Last transaction succeeded** | The last transaction finished without an error. |
-| ''F000'' | **No reply (F0)** | No reply arrived. | +| ''F000'' | **No response (F0)** | No response arrived. | 
-| ''F100'' | **Checksum error (F1)** | A reply with a wrong checksum arrived. | +| ''F100'' | **Checksum error (F1)** | A response with a wrong checksum arrived. | 
-| ''F200'' | **Only bytes of another shape arrived (F2)** | Only bytes that do not match the layout of the frame to receive arrived. |+| ''F200'' | **Only unrecognized bytes arrived (F2)** | Only bytes that do not match the format of the frame to receive arrived. |
 | ''F300'' | **Line busy (F3)** | The frame could not be sent because transmission did not proceed. | | ''F300'' | **Line busy (F3)** | The frame could not be sent because transmission did not proceed. |
-| ''F400'' | **Value conversion failed (F4)** | The received value is not a number or does not fit the cell. F4 is also set when a value to send cannot be made into a frame. | +| ''F400'' | **Value conversion failed (F4)** | The received value is not a number or does not fit the address. F4 is also set when a value to send cannot be made into a frame. | 
-| ''F500'' | **Receive buffer overflow (F5)** | The receive buffer overflowed while waiting for a reply. | +| ''F500'' | **Receive buffer overflow (F5)** | The receive buffer overflowed while waiting for a response. | 
-| ''F600'' | **Error reply (F6)** | A frame defined as the error reply (NAK and so on) was received. |+| ''F600'' | **Error response (F6)** | A frame defined as the error response (NAK and so on) was received. |
  
-  * A failed transaction does not change the received-value cells. The values received earlier remain. +  * A failed transaction does not change the addresses that receive values. The values received earlier remain. 
-  * If bytes were dropped before the reply timeout expired, the status records the reason, checked in the order F1 → F4 → F2. If no bytes were dropped, the status is F0. +  * If bytes were dropped before the response timeout expired, the status shows one reason, chosen in priority order F1, F4, F2. If no bytes were dropped, the status is F0. 
-  * Each transaction must use its own status word. A warning is shown if the status word overlaps a received-value cell.+  * Each transaction must use its own status word. A warning is shown if the status word overlaps an address that receives values.
  
-{{ :en-us_products:mp_studio:up-status-timing.svg?1000 |Figure 15. When the status word and the done bit change with the reply timeout and retries }}+{{ :en-us_products:mp_studio:up-status-timing.svg?1000 |Figure 15. When the status word and the done bit change with the timeout and retries }}
  
-==== Gaps Between Characters Are OK ====+==== Allow Gaps Between Characters ====
  
 This is set for each port, and is on for a new port. This is set for each port, and is on for a new port.
Line 288: Line 320:
   * **Off:** Sends the whole frame in one go. That scan becomes longer by the time it takes to send the frame. It must be off for a device that discards requests with gaps between characters.   * **Off:** Sends the whole frame in one go. That scan becomes longer by the time it takes to send the frame. It must be off for a device that discards requests with gaps between characters.
  
-{{ :en-us_products:mp_studio:up-bytegap.svg?1000 |Figure 16. How request bytes go out with Gaps between characters are OK turned on and off }}+{{ :en-us_products:mp_studio:up-bytegap.svg?1000 |Figure 16. How request bytes go out with Allow gaps between characters turned on and off }}
  
 ===== Starting from the Ladder (UPTRIG) ===== ===== Starting from the Ladder (UPTRIG) =====
  
-When you set the **Start** of a transaction to **Ladder UPTRIG number**, the ''UPTRIG'' function in the ladder runs that transaction. Use this to send a setting command only when a button is pressed, or to read a value only when you need it.+When you set the **Trigger** of a transaction to **Ladder UPTRIG number**, the ''UPTRIG'' function in the ladder runs that transaction. Use this to send a setting command only when a button is pressed, or to read a value only when you need it.
  
-  - Set the **Start** of the transaction to **Ladder UPTRIG number** and enter the **Number** (1 to 255). If needed, also enter the **done bit** and the **Status word**.+  - Set the **Trigger** of the transaction to **Ladder UPTRIG number** and enter the **Number** (1 to 255). If needed, also enter the **Done bit** and the **Status word**.
   - Click **OK**.   - Click **OK**.
-  - Add an ''UPTRIG'' function to the ladder and enter the same number. Choose **UPTRIG: Start User Protocol Trigger** in the **Serialport** category of the Functions panel, or type ''UPTRIG 3'' in the Insert Function window (''Ctrl+E'').+  - Add an ''UPTRIG'' function to the ladder and enter the same number. Choose **UPTRIG: Start User Protocol Trigger** in the **Serial Port** category of the Functions panel, or type ''UPTRIG 3'' in the Insert Function window (''Ctrl+E'').
  
 {{ :en-us_products:mp_studio:up-uptrig-rung.png?900 |Figure 17. A rung that sends the transaction of trigger 3 (zero command) when M3 turns on }} {{ :en-us_products:mp_studio:up-uptrig-rung.png?900 |Figure 17. A rung that sends the transaction of trigger 3 (zero command) when M3 turns on }}
  
-When you edit the number cell of ''UPTRIG'', the trigger numbers defined in the user protocol are listed with their communication port and transaction name, and you can click one to choose it. Click **Open user protocol** in the same place to open the User Protocol window.+When you edit the number cell of ''UPTRIG'', the trigger numbers defined in the user protocol are listed with their communication port and transaction name, and you can click one to choose it. Click **Open User Protocol** in the same place to open the User Protocol window.
  
 {{ :en-us_products:mp_studio:up-uptrig-box.png?640 |Figure 18. Choosing a defined trigger number in the UPTRIG number cell }} {{ :en-us_products:mp_studio:up-uptrig-box.png?640 |Figure 18. Choosing a defined trigger number in the UPTRIG number cell }}
Line 309: Line 341:
   * Transactions with the same number on the same communication port run together. The same number cannot be used for transactions on different communication ports.   * Transactions with the same number on the same communication port run together. The same number cannot be used for transactions on different communication ports.
   * Transactions started by a trigger do not run automatically after the PLC is turned on or a program is downloaded.   * Transactions started by a trigger do not run automatically after the PLC is turned on or a program is downloaded.
-  * The ''UPTRIG'' number must be a constant from 1 to 255, and the user protocol must have a transaction started by that number. Otherwise the cell turns red and the program cannot be compiled. Conversely, if a transaction has a trigger number but there is no matching ''UPTRIG'' in the ladder, the warning "No UPTRIG cell calls trigger number 3, so this transaction never starts." is shown.+  * The ''UPTRIG'' number must be a constant from 1 to 255, and the user protocol must have a transaction started by that number. Otherwise the ''UPTRIG'' box turns red and the program cannot be compiled. Conversely, if a transaction has a trigger number but there is no matching ''UPTRIG'' in the ladder, the warning "No UPTRIG box calls trigger number 3, so this transaction never starts." is shown.
  
 ===== Checks and Warnings ===== ===== Checks and Warnings =====
  
-The User Protocol window marks items to fix by turning chips and boxes red or orange, and shows the first message in the bar at the bottom of the window. Click a message to go to that place, or click **N more** to expand all messages. While there are red items to fix, **N to fix — the program is not built until they are fixed** is shown and you cannot download. **OK** still works while there are items to fix, so you do not lose a definition in progress.+The User Protocol window marks errors and warnings by turning fields and input boxes red or orange, and shows the first message in the bar at the bottom of the window. Click a message to go to that place, or click **N more** to expand all messages. While there are red errors, **Errors: N — the program won't compile until they are fixed** is shown and you cannot download. **OK** still works while there are errors, so you do not lose a definition in progress.
  
-{{ :en-us_products:mp_studio:up-issues.png?1000 |Figure 19. Items to fix in the bar at the bottom of the window and a box marked in red }}+{{ :en-us_products:mp_studio:up-issues.png?1000 |Figure 19. Errors in the bar at the bottom of the window and an input box marked in red }}
  
 The ladder and other features are checked for the following cases. The ladder and other features are checked for the following cases.
  
 ^ Case ^ Shown as ^ ^ Case ^ Shown as ^
-| ''PUT'', ''GET'', ''PUT_LEN'' or ''GET_LEN'' is used on the same communication port | A red cell if the channel is a constant, a warning if it is a variable. If two features read the same receive buffer, the bytes they exchange get mixed up. | +| ''PUT'', ''GET'', ''PUT_LEN'' or ''GET_LEN'' is used on the same communication port | An error (shown in red) if the channel is a constant, a warning if it is a variable. If two features read the same receive buffer, the bytes they exchange get mixed up. | 
-| The ladder writes to a cell that the user protocol receives into | Warning. The value written by the ladder is overwritten at the next reception. | +| The ladder writes to an address that the user protocol receives into | Warning. The value written by the ladder is overwritten at the next reception. | 
-| Receiving cells overlap each other · a status, done or received-count cell overlaps a receiving cell | Warning | +| Receiving addresses overlap each other · a status word, done bit or receive counter overlaps a receiving address | Warning | 
-| Cells overlap those used by the Modbus device table or the [[:en-us_products:mp_studio:device_clock|device clock (RTC)]] block | Warning |+| Addresses overlap those used by the Modbus device table or the [[:en-us_products:mp_studio:device_clock|PLC clock (RTC)]] block | Warning |
 | The port mode is not ''User Protocol'' · the mode is ''User Protocol'' but there is no definition · download is turned on | Error. Clicking **OK** in the User Protocol window fixes most of these at once. | | The port mode is not ''User Protocol'' · the mode is ''User Protocol'' but there is no definition · download is turned on | Error. Clicking **OK** in the User Protocol window fixes most of these at once. |
 | The PLC does not have enough RAM · the program does not fit in the flash | Error. Reduce the ports, transactions or frames, or the memory area sizes. | | The PLC does not have enough RAM · the program does not fit in the flash | Error. Reduce the ports, transactions or frames, or the memory area sizes. |
 | A frame is longer than 255 bytes or has more than 32 fields | Error | | A frame is longer than 255 bytes or has more than 32 fields | Error |
-| The send or receive buffer is smaller than a frame | Error. Enlarge the buffer in the **SERIAL** field of **Setting → Data Memory**, or shorten the frame. |+| The send or receive buffer is smaller than a frame | Error. Enlarge the buffer in the **SERIAL** field of **Settings → Data Memory**, or shorten the frame. |
  
-Cells used by the user protocol also appear in Find, Replace All, the Used at list of the Inspector and **Used Data**. When you change an address with Replace All, the user protocol cells change too.+Addresses used by the user protocol also appear in Find, Replace all, the Used at list of the Inspector and **Used Data**. When you change an address with Replace all, the user protocol addresses change too.
  
 ===== Simulation ===== ===== Simulation =====
  
-During simulation, a virtual device is attached to the user protocol of each communication port, and the **Simulated device** view is added to the window. You can check the ladder's behavior and the status word and done bit without a device.+During simulation, a virtual device is attached to the user protocol of each communication port, and the **Virtual device** view is added to the window. You can check the ladder's behavior and the status word and done bit without a device.
  
-{{ :en-us_products:mp_studio:up-sim.png?1000 |Figure 20. The Simulated device view (the replies and traffic log of an ASCII station read transaction) }}+{{ :en-us_products:mp_studio:up-sim.png?1000 |Figure 20. The Virtual device view (the responses and comm log of an ASCII station read transaction) }}
  
-  * **Transactions — status cell · reply example:** Choose a transaction and what the virtual device does (**Reply**, **No response**, **Bad checksum** or **Error reply**). For **Reply**, enter the values the PLC is to receive. Until a reply example is set, there is no reply (status word F0). +  * **Transactions — status word · response example:** Choose a transaction and what the virtual device does (**Response**, **No response**, **Bad checksum** or **Error response**). For **Response**, enter the values the PLC is to receive. Until a response example is set, there is no response (status word F0). 
-  * **Virtual device sends on its own — Receive only / Answer on receive:** Enter the values of a frame to receive and click **Put in** to have the virtual device send that frame. +  * **Virtual device sends on its own — Receive only / Respond on receive:** Enter the values of a frame to receive and click **Inject** to have the virtual device send that frame. 
-  * **Put raw bytes in (garbage / resync test):** Puts the entered bytes in as they are, so you can check that noise bytes are dropped and matching starts again. +  * **Inject raw bytes (garbage / resync test):** Injects the entered bytes as they are, so you can check that noise bytes are dropped and matching starts again. 
-  * **Traffic log (virtual time):** Shows the bytes sent by the PLC and the bytes sent by the virtual device, one line each.+  * **Comm log (virtual time):** Shows the bytes sent by the PLC and the bytes sent by the virtual device, one line each.
  
-Only definitions confirmed with **OK** are simulated. A definition with items to fix is not simulated. Line busy (F3) and receive buffer overflow (F5) are not simulated, and the scan time and the processing time of the device are not included. The virtual device settings are not saved.+Only definitions confirmed with **OK** are simulated. A definition with errors is not simulated. Line busy (F3) and receive buffer overflow (F5) are not simulated, and the scan time and the processing time of the device are not included. The virtual device settings are not saved.
  
 ===== Monitoring ===== ===== Monitoring =====
Line 348: Line 380:
 ==== Status on Transaction Cards ==== ==== Status on Transaction Cards ====
  
-If you open the User Protocol window during monitoring, the card of each transaction that has a status word shows the last result. Receive only and Answer on receive transactions also show the value of the received-count cell and the time since it last increased. Status is read only for the transactions of the selected communication port.+If you open the User Protocol window during monitoring, the card of each transaction that has a status word shows the last result. Receive only and Respond on receive transactions also show the value of the receive counter and the time since it last increased. Status is read only for the transactions of the selected communication port.
  
 {{ :en-us_products:mp_studio:up-monitor-cards.png?480 |Figure 21. Transaction card status during monitoring (Read CO2 concentration — Last transaction succeeded) }} {{ :en-us_products:mp_studio:up-monitor-cards.png?480 |Figure 21. Transaction card status during monitoring (Read CO2 concentration — Last transaction succeeded) }}
Line 355: Line 387:
  
 ^ Shown in gray ^ Meaning ^ ^ Shown in gray ^ Meaning ^
-| **Different program on PLC** | The program on the PLC may differ from this document. The status is read after you download. |+| **Different program on PLC** | The program on the PLC may differ from this project. The status is read after you download. |
 | **Not downloaded yet** | The transaction was not in the definition when monitoring started. Click **OK**, download and restart monitoring to read it. | | **Not downloaded yet** | The transaction was not in the definition when monitoring started. Click **OK**, download and restart monitoring to read it. |
-| **PLC not answering · unknown** · **No new value · unknown** | No new values are arriving over the monitoring connection. |+| **PLC not responding · value unknown** · **No new value · value unknown** | No new values are arriving over the monitoring connection. |
 | **Limited monitoring · not read** | While there are program check errors, status words in user memory are not read. | | **Limited monitoring · not read** | While there are program check errors, status words in user memory are not read. |
-| **Not written by the runtime** | The user protocol does not write this value. The program on the PLC is different, or the ladder writes to this cell. |+| **Not written by the runtime** | The user protocol does not write this value. The program on the PLC is different, or the ladder writes to this address. |
  
 During simulation, the card also shows **Virtual**. A transaction that has not been confirmed with OK shows **Not applied yet**, and a stopped simulation shows **Simulation stopped · …**. During simulation, the card also shows **Virtual**. A transaction that has not been confirmed with OK shows **Not applied yet**, and a stopped simulation shows **Simulation stopped · …**.
  
-==== Traffic Log ====+==== Comm Log ====
  
-Turn on **Comm log while monitoring** for a port, click **OK** and download. During monitoring, the **Traffic log** view then shows the bytes the PLC sent and received on that communication port, one line each. Turning on the traffic log uses a little more RAM and flash on the PLC.+Turn on **Comm log while monitoring** for a port, click **OK** and download. During monitoring, the **Comm log** view then shows the bytes the PLC sent and received on that communication port, one line each. Turning on the comm log uses a little more RAM and flash on the PLC.
  
-{{ :en-us_products:mp_studio:up-trace-marked.svg?1000 |Figure 22. The Traffic log view (CO2 request and reply) }}+{{ :en-us_products:mp_studio:up-trace-marked.svg?1000 |Figure 22. The Comm log view (CO2 request and response) }}
  
   * **① Direction and time:** ''→'' marks bytes the PLC sent, and ''←'' bytes it received. Lines are in the order in which the PLC exchanged them, and the time is when the PC read the log.   * **① Direction and time:** ''→'' marks bytes the PLC sent, and ''←'' bytes it received. Lines are in the order in which the PLC exchanged them, and the time is when the PC read the log.
   * **② Bytes:** The bytes exchanged. The line below shows the transaction and frame names and the decoded values (for example ''✓ D100 = 410 · ✓ Checksum DF'').   * **② Bytes:** The bytes exchanged. The line below shows the transaction and frame names and the decoded values (for example ''✓ D100 = 410 · ✓ Checksum DF'').
-  * **③ Result:** The result of those bytes. A sent line shows **Success**, **Waiting for reply**, **Resent N**, **Not sent** or the reason for a failure, and a received line shows **Reply**, **Receive**, **Error reply (F6)**, **dropped** and so on. **dropped** marks bytes that matched no frame.+  * **③ Result:** The result of those bytes. A sent line shows **Success**, **Waiting for response**, **Resent N**, **Not sent** or the reason for a failure, and a received line shows **Response**, **Receive**, **Error response (F6)**, **dropped** and so on. **dropped** marks bytes that matched no frame.
   * **④ Byte view:** Choose **Hex**, **Text** or **Both**. In the text view, control characters are shown like ''‹STX›''.   * **④ Byte view:** Choose **Hex**, **Text** or **Both**. In the text view, control characters are shown like ''‹STX›''.
   * **⑤ Copy and Clear log:** Copy the lines shown as text, or clear the log on the screen. While the view is scrolled to the bottom, it follows new lines.   * **⑤ Copy and Clear log:** Copy the lines shown as text, or clear the log on the screen. While the view is scrolled to the bottom, it follows new lines.
  
-  * If the program on the PLC was downloaded with the traffic log off, or differs from this document, the log is not read and the reason is shown.+  * If the program on the PLC was downloaded with the comm log off, or differs from this project, the log is not read and the reason is shown.
   * If the PLC writes new records before the monitor reads them, "… N missed in between" is shown.   * If the PLC writes new records before the monitor reads them, "… N missed in between" is shown.
   * During simulation, the same view shows the exchange with the virtual device in virtual time.   * During simulation, the same view shows the exchange with the virtual device in virtual time.
  
-===== Direct PC Test =====+===== PC Test =====
  
-The direct PC test exchanges data directly with a device through a COM port on the PC (through a USB-RS485 or USB-RS232 converter, for example) instead of the PLC. Use it to check that the frames and checksum are right before you connect the device to the PLC. The test uses the definition as edited in the window, before OK, and is available only in the desktop app.+The PC test exchanges data directly with a device through a COM port on the PC (through a USB-RS485 or USB-RS232 converter, for example) instead of the PLC. Use it to check that the frames and checksum are right before you connect the device to the PLC. The test uses the definition as edited in the window, before OK, and is available only in the desktop app.
  
-{{ :en-us_products:mp_studio:up-pc-marked.svg?1000 |Figure 23. The Direct PC test view }}+{{ :en-us_products:mp_studio:up-pc-marked.svg?1000 |Figure 23. The PC test view }}
  
-  * **① PC COM port:** The list of COM ports on the PC. USB devices are shown with the device name, as in ''COM10 — USB Serial Port'', and Bluetooth ports are shown as ''COM23 (Bluetooth)''. At first, **(Pick a port)** is shown; if a COM port was opened for this communication port last time, it is selected in advance. **Refresh** reads the list again. +  * **① PC COM port:** The list of COM ports on the PC. USB devices are shown with the device name, as in ''COM10 — USB Serial Port'', and Bluetooth ports are shown as ''COM23 (Bluetooth)''. At first, **(select a port)** is shown; if a COM port was opened for this communication port last time, it is selected in advance. **Refresh** reads the list again. 
-  * **② Open and Close:** Opens the selected COM port. The line uses the communication settings of that communication port as they are (baud rate, data bits, parity and stop bits). Switching to another view or closing the window closes the port. +  * **② Open and Close:** Opens the selected COM port. The baud rate, data bits, parity and stop bits are taken from the settings of that communication port. Switching to another view or closing the window closes the port. 
-  * **③ One transaction — Ask & receive / Send only:** Choose a transaction on the left, enter the values to send (sample values) and click **Send once**. The PC makes one exchange, with the reply timeout and retries handled the same way as on the PLC, and shows the result. +  * **③ One transaction — Request/response, Send only:** Choose a transaction on the left, enter the values to send (sample values) and click **Send once**. The PC makes one exchange, with the response timeout and retries handled the same way as on the PLC, and shows the result. 
-  * **④ Listen — Receive only / Answer on receive (what the device sends):** Click **Start listening** to receive and decode the bytes the device sends. Use it to see exactly what a barcode reader sends. For an Answer on receive transaction, the PC answers with the sample values entered in ③. +  * **④ Listen — Receive only / Respond on receive:** Click **Start listening** to receive and decode the bytes the device sends. Use it to see exactly what a barcode reader sends. For a Respond on receive transaction, the PC responds with the sample values entered in ③. 
-  * **⑤ Traffic log:** The bytes exchanged are shown in the same form as in the Traffic log view. When a reply arrives with a wrong checksum, the **Find the matching variant** line shows the checksum candidates that fit; once two or more such replies have been collected, you can click **Change to "…"**.+  * **⑤ Comm log:** The bytes exchanged are shown in the same form as in the Comm log view. When a response arrives with a wrong checksum, the **Find matching checksum** line shows the checksum candidates that fit; once two or more such responses have been collected, you can click **Change to "…"**.
  
   * A COM port in use by monitoring or download is marked "— in use by monitoring/download" and cannot be opened. Open it after monitoring or download has ended.   * A COM port in use by monitoring or download is marked "— in use by monitoring/download" and cannot be opened. Open it after monitoring or download has ended.
   * The download COM port in the communication settings is marked "— download port", and choosing it shows a notice that the port may be connected to the PLC.   * The download COM port in the communication settings is marked "— download port", and choosing it shows a notice that the port may be connected to the PLC.
-  * The direct PC test checks the PC-side line and the device. Check any behavior that depends on the scan time again on the PLC.+  * The PC test checks the PC-side line and the device. Check any behavior that depends on the scan time again on the PLC.
  
 ===== Examples ===== ===== Examples =====
  
-In the examples below, the three templates are set on Comm Port 1 to Comm Port 3 of ''MPS-8A8R'', one template per port. On other models, you can follow the same steps with only the communication port numbers changed.+In the examples below, three of the templates are set on Comm Port 1 to Comm Port 3 of ''MPS-8A8R'', one template per port. On other models, you can follow the same steps with only the communication port numbers changed.
  
 ==== Example 1. Reading a CO2 Sensor Every Second ==== ==== Example 1. Reading a CO2 Sensor Every Second ====
Line 403: Line 435:
 In this example, a CO2 sensor connected to Comm Port 1 (9600 · 8-N-1) is read every second for its concentration, and a button input sends the zero command. In this example, a CO2 sensor connected to Comm Port 1 (9600 · 8-N-1) is read every second for its concentration, and a button input sends the zero command.
  
-  - In **Setting → Communication Port**, set **Serial 1** to a baud rate of 9600, 8 data bits, no parity and 1 stop bit. +  - In **Settings → Communication Port**, set **Serial 1** to a baud rate of 9600, 8 data bits, no parity and 1 stop bit. 
-  - In **Setting → User Protocol…**, select the **Comm Port 1** tab and click the template **CO2 / gas sensor — ask every second**.+  - In **Settings → User Protocol…**, select the **Comm Port 1** tab and click the template **CO2 / gas sensor — poll every second**.
   - Click **OK**. Comm Port 1 changes to ''User Protocol'' mode.   - Click **OK**. Comm Port 1 changes to ''User Protocol'' mode.
   - Add a rung to the ladder that sends the zero command.   - Add a rung to the ladder that sends the zero command.
Line 412: Line 444:
  
 ^ Frame ^ Bytes ^ ^ Frame ^ Bytes ^
-| CO2 request | ''FF 01 86 00 00 00 00 00 79'' (fixed ''FF'', ''01'', ''86'' and ''00*5'' + two's complement sum from byte 2) | +| CO2 request | ''FF 01 86 00 00 00 00 00 79'' (fixed ''FF'', ''01'', ''86'' and ''00*5'' + two's complement sum starting at Byte 2) | 
-| CO2 reply | ''FF 86'' + concentration in 2 bytes (big-endian → ''D100'') + 4 skipped bytes + two's complement sum |+| CO2 response | ''FF 86'' + concentration in 2 bytes (Big-endian → ''D100'') + 4 skipped bytes + two's complement sum |
 | Zero command | ''FF 01 87 00 00 00 00 00 78'' | | Zero command | ''FF 01 87 00 00 00 00 00 78'' |
  
Line 428: Line 460:
  
 ^ Item ^ Value ^ ^ Item ^ Value ^
-| Frame "Barcode" | Text (''D200'' · up to the end character · at most 32 · received length in ''D190'') + fixed ''CR LF'' | +| Frame "Barcode" | Text (''D200'' · until terminator · max 32 · received length in ''D190'') + fixed ''CR LF'' | 
-| Transaction "Receive barcode" | Receive only · always listening · done bit ''M101'' · received-count cell ''D191'' |+| Transaction "Receive barcode" | Receive only · always listening · done bit ''M101'' · receive counter ''D191'' |
  
 When the reader sends ''ILOGICS-1234'' followed by ''CR LF'', ''D190'' becomes 12, and the characters are stored from ''D200'' on, two per word (''D200'' = ''I'' and ''L''). ''M101'' turns on for one scan, and ''D191'' increases by 1. An empty line (only ''CR LF'') is received as a frame with 0 characters. When the reader sends ''ILOGICS-1234'' followed by ''CR LF'', ''D190'' becomes 12, and the characters are stored from ''D200'' on, two per word (''D200'' = ''I'' and ''L''). ''M101'' turns on for one scan, and ''D191'' increases by 1. An empty line (only ''CR LF'') is received as a frame with 0 characters.
  
-{{ :en-us_products:mp_studio:up-ex2-barcode.png?1000 |Figure 25. The traffic log of Example 2 (text view) and the received count }}+{{ :en-us_products:mp_studio:up-ex2-barcode.png?1000 |Figure 25. The comm log of Example 2 (Text view) and the received count }}
  
 ==== Example 3. Reading an Inverter Value with ASCII Station Commands ==== ==== Example 3. Reading an Inverter Value with ASCII Station Commands ====
Line 446: Line 478:
 | 0 | ''@ON'' | ''MOVE 100 D10'' | Puts the address to read, 100, in ''D10''. | | 0 | ''@ON'' | ''MOVE 100 D10'' | Puts the address to read, 100, in ''D10''. |
  
-^ Frame ^ Layout ^ Example ^ +^ Frame ^ Format ^ Example ^ 
-| Station request | ''STX "01" "R"'' + address (ASCII decimal, 4 digits · ''D10'') + ''ETX'' + sum (8 bit) as 2 ASCII hex digits (from byte 2) | ''02 "01R0100" 03 "77"'' | +| Station request | ''STX "01" "R"'' + address (ASCII decimal, 4 digits · ''D10'') + ''ETX'' + sum (8-bit) as 2 ASCII hex digits (starting at Byte 2) | ''02 "01R0100" 03 "77"'' | 
-| Station reply | ''ACK "01" "R"'' + value (ASCII hex, 4 digits · ''D11'') + ''ETX'' + sum (8 bit) as 2 ASCII hex digits (from byte 2) | ''06 "01R03E8" 03 "96"'' → ''D11'' = 1000 |+| Station response | ''ACK "01" "R"'' + value (ASCII hex, 4 digits · ''D11'') + ''ETX'' + sum (8-bit) as 2 ASCII hex digits (starting at Byte 2) | ''06 "01R03E8" 03 "96"'' → ''D11'' = 1000 |
 | Station error (NAK) | ''NAK "01" ETX'' | When it is received, the status word ''D12'' = ''F600'' | | Station error (NAK) | ''NAK "01" ETX'' | When it is received, the status word ''D12'' = ''F600'' |
  
-The transaction "Read station" is Ask & receive, with a period of 500 ms, a reply timeout of 300 ms, 3 retries and the status word ''D12''. In this template, **Gaps between characters are OK** is off, so the request is sent in one go.+The transaction "Read station" is Request/response, with a period of 500 ms, a response timeout of 300 ms, 3 retries and the status word ''D12''. In this template, **Allow gaps between characters** is off, so the request is sent in one go.
  
-{{ :en-us_products:mp_studio:up-ex3-trace.png?1000 |Figure 26. The traffic log of Example 3 (Both view — hex and control characters) }}+{{ :en-us_products:mp_studio:up-ex3-trace.png?1000 |Figure 26. The comm log of Example 3 (Both view — hex and control characters) }}
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
Line 459: Line 491:
 ^ Symptom ^ What to check ^ ^ Symptom ^ What to check ^
 | The status word stays at ''0000'' | Check that the downloaded program contains the user protocol. For a transaction started by a trigger, also check that the ''UPTRIG'' input in the ladder changed from off to on. | | The status word stays at ''0000'' | Check that the downloaded program contains the user protocol. For a transaction started by a trigger, also check that the ''UPTRIG'' input in the ladder changed from off to on. |
-| ''F000'' (no reply) | Use the direct PC test to check whether the device answers the same frame. If it does, check the communication port number and terminals (RS-232, RS-485 or UART), the + and - wiring of RS-485, and the communication settings. If the device is slow to reply, increase the **Reply timeout (ms)**. | +| ''F000'' (no response) | Use the PC test to check whether the device responds to the same frame. If it does, check the communication port number and terminals (RS-232, RS-485 or UART), the + and - wiring of RS-485, and the communication settings. If the device is slow to respond, increase the **Timeout (ms)**. | 
-| ''F100'' (checksum error) | Paste two or more frames that the device sent and check them with [[#finding_the_matching_checksum_variant|Finding the Matching Checksum Variant]]. | +| ''F100'' (checksum error) | Paste two or more frames that the device sent and check them with [[#finding_the_matching_checksum|Finding the Matching Checksum]]. | 
-| ''F200'' (only bytes of another shape) | Paste the bytes the device sent into the preview to see which byte differs. Check the station number, the header bytes, the data bits (7 or 8) and the parity. | +| ''F200'' (only unrecognized bytes) | Paste the bytes the device sent into the preview to see which byte differs. Check the station number, the header bytes, the data bits (7 or 8) and the parity. | 
-| ''F400'' (value conversion failed) | In the preview, check the format of the value field (digits, decimal places, hex) and the size of the PLC cell. | +| ''F400'' (value conversion failed) | In the preview, check the format of the value field (digits, decimal places, hex) and the size of the PLC address. | 
-| ''F500'' (receive buffer overflow) | If the scan time is long for the baud rate, more bytes than the receive buffer holds pile up within one scan. Shorten the scan time, or enlarge the receive buffer in the **SERIAL** field of **Setting → Data Memory**. With a 128-byte buffer at 115200 bps, the scan time must not exceed about 11 ms. | +| ''F500'' (receive buffer overflow) | If the scan time is long for the baud rate, more bytes than the receive buffer holds pile up within one scan. Shorten the scan time, or enlarge the receive buffer in the **SERIAL** field of **Settings → Data Memory**. With a 128-byte buffer at 115200 bps, the scan time must not exceed about 11 ms. | 
-| Requests go out but the device does not answer (gaps between characters) | The device may not accept gaps between characters. Turn off **Gaps between characters are OK** for the port, download and check again. |+| Requests go out but the device does not respond (gaps between characters) | The device may not accept gaps between characters. Turn off **Allow gaps between characters** for the port, download and check again. |
 | Only the end of a long barcode is stored | When a code longer than the maximum number of characters of the text field arrives, only its last characters, up to that maximum, are stored. Set **N** larger than the longest code. | | Only the end of a long barcode is stored | When a code longer than the maximum number of characters of the text field arrives, only its last characters, up to that maximum, are stored. Set **N** larger than the longest code. |
 | Values are stored even though the line is noisy | The PLC does not check for parity errors. Define frames that include a checksum. | | Values are stored even though the line is noisy | The PLC does not check for parity errors. Define frames that include a checksum. |
-| The port does not open in the direct PC test | Check that monitoring, download or another program is not using that COM port. |+| The port does not open in the PC test | Check that monitoring, download or another program is not using that COM port. |
  
 ===== Things to Check ===== ===== Things to Check =====
  
-  * An ''.mpx'' project that uses the user protocol or ''UPTRIG'' cannot be opened in V1.2.0 or earlier. +> **Cannot be opened in V1.2.0 or earlier** 
-  * Set up the ladder so that it only reads the received-value cells.+> An ''.mpx'' project that uses the user protocol or ''UPTRIG'' cannot be opened in V1.2.0 or earlier. 
 + 
 +Set up the ladder so that it only reads the addresses that receive values.
  
 ===== Related Pages ===== ===== Related Pages =====
en-us_products/mp_studio/user_protocol.1794238713.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki