Learn how to find the serial ports to use for your device in Arduino PLC IDE.
About serial ports in Arduino PLC IDE
Tip
For instructions on how to set up your PLC device in PLC IDE, see Arduino PLC IDE Setup & Device License Activation.
When using Arduino PLC devices you may see two different serial ports:
-
The standard serial port.
- Port for serial communication, same as any Arduino board.
- Target this port when installing the runtime.
-
The virtual Modbus port.
- This port is created when the runtime is installed and running.
- Target this port when configuring the connection (On-line > Set up communication).
- Because this port is created later, it will usually have a higher “COM port” number.
Here are some tips for using serial ports in Arduino PLC IDE:
- 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.
- 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.
- To refresh the list of ports in the runtime installation widget, select Project > Refresh current target.
- To refresh the list of ports when configuring the connection (On-line > Set up communication), close and reopen the Modbus Config window.
Check COM port numbers in Device Manager
If you are unsure what the COM port number of your PLC device ports are, you can check them in Windows Device Manager:
-
Press Win + X and select Device Manager, or search for “Device Manager” in the Start menu.
-
Select View > Devices by container.
-
Look for an Arduino Opta or Portenta H7 MCUboot container.
-
Click to expand the container:
-
Look for USB Serial Device items, and note the COM port numbers:
Tip: Distinguish between the serial and Modbus port
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:
-
The standard serial port will print debug information:
** Initializing FileSystem QSPI in 2... ** Initializing FileSystem QSPI in 1... Checking QSPIF partition scheme... Wifi Data: Partition type 11 Partition num 1 Partition size 1044480 Partition start 4096 Partition stop 1048576 [...]
-
The virtual Modbus port will not print anything to serial on boot.