en-us_products:mp_studio:user_protocol

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
en-us_products:mp_studio:user_protocol [2026/11/10 19:26] – 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 82: Line 82:
 {{ :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 }} {{ :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.
  
Line 96: 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 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.   * 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 328: Line 328:
   - 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**.   - 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 }}
Line 355: Line 355:
 | 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. | | 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 addresses overlap each other · a status word, done bit or receive counter overlaps a receiving address | Warning | | Receiving addresses overlap each other · a status word, done bit or receive counter overlaps a receiving address | Warning |
-| Addresses 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. |
  
-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.+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 =====
Line 435: 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 — poll 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 495: Line 495:
 | ''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. | | ''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 address. | | ''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 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. | | 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. |
en-us_products/mp_studio/user_protocol.1794306404.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki