|
| 1 | +--- |
| 2 | +title: "Identify the serial ports of your PLC device" |
| 3 | +id: 16724283965596 |
| 4 | +--- |
| 5 | + |
| 6 | +Learn how to find the serial ports to use for your device in Arduino PLC IDE. |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## About serial ports in Arduino PLC IDE |
| 11 | + |
| 12 | +> [!TIP] |
| 13 | +> For instructions on how to set up your PLC device in PLC IDE, see [Arduino PLC IDE Setup & Device License Activation](https://docs.arduino.cc/software/plc-ide/tutorials/plc-ide-setup-license). |
| 14 | +
|
| 15 | +When using Arduino PLC devices you may see two different serial ports: |
| 16 | + |
| 17 | +* _The standard serial port._ |
| 18 | + * Port for serial communication, same as any Arduino board. |
| 19 | + * Target this port when [installing the runtime](https://docs.arduino.cc/software/plc-ide/tutorials/plc-ide-setup-license/#3-download-the-runtime). |
| 20 | +* _The virtual Modbus port._ |
| 21 | + * This port is created when the runtime is installed and running. |
| 22 | + * Target this port when [configuring the connection](https://docs.arduino.cc/software/plc-ide/tutorials/plc-ide-setup-license/#4-connect-to-the-device) (**On-line > Set up communication**). |
| 23 | + * Because this port is created later, it will usually have a higher "COM port" number. |
| 24 | + |
| 25 | +Here are some tips for using serial ports in Arduino PLC IDE: |
| 26 | + |
| 27 | +* All serial ports on your system will be available Arduino PLC IDE. This includes those of other Arduino boards, or virtual communication ports for built-in connectivity interfaces. |
| 28 | +* Arduino PLC IDE only displays the COM port number for each port, so it can be helpful to limit the number of serial ports to choose from by disconnect unused USB devices. |
| 29 | +* To refresh the list of ports in the runtime installation widget, select **Project > Refresh current target**. |
| 30 | +* To refresh the list of ports when configuring the connection (**On-line > Set up communication**), close and reopen the **Modbus Config** window. |
| 31 | + |
| 32 | +## Check COM port numbers in Device Manager |
| 33 | + |
| 34 | +If you are unsure what the COM port number of your PLC device ports are, you can check them in Windows Device Manager: |
| 35 | + |
| 36 | +1. Press <kbd>Win</kbd> + <kbd>X</kbd> and select Device Manager, or search for "Device Manager" in the Start menu. |
| 37 | +1. Select **View > Devices by container**. |
| 38 | +1. Look for an **Arduino Opta** or **Portenta H7 MCUboot** container. |
| 39 | +1. Click to expand the container: |
| 40 | + |
| 41 | +  |
| 42 | + |
| 43 | +1. Look for **USB Serial Device** items, and note the COM port numbers: |
| 44 | + |
| 45 | +### Tip: Distinguish between the serial and Modbus port |
| 46 | + |
| 47 | +If you are unsure which of the two ports to use when configuring the device in Arduino PLC IDE, try opening the serial port with a serial monitor, such as the one built into Arduino IDE. After you've opened the port, reset the device and observe the output: |
| 48 | + |
| 49 | +* _The standard serial port_ will print debug information: |
| 50 | + |
| 51 | + ``` |
| 52 | + ** Initializing FileSystem QSPI in 2... |
| 53 | + ** Initializing FileSystem QSPI in 1... |
| 54 | + Checking QSPIF partition scheme... |
| 55 | + Wifi Data: |
| 56 | + Partition type 11 |
| 57 | + Partition num 1 |
| 58 | + Partition size 1044480 |
| 59 | + Partition start 4096 |
| 60 | + Partition stop 1048576 |
| 61 | + [...] |
| 62 | + ``` |
| 63 | + |
| 64 | +* _The virtual Modbus port_ will not print anything to serial on boot. |
0 commit comments