APC usb serial port

Hi, i have some questions about usb serial ports in a APC 2200, 3100.

  • is there a way to access a usb RS232 port in a Automation Runtime program running on a APC?
  • also if I connect a T30 panel to that an APC will the APC recognize any usb device if I connect that device to the T30’s USB ports?

thanks

Hi Jose,

welcome to our community!

The USB ports on the PLCs are mainly used for accessing storage devices.
On APCs running AR, for example you can read / write files or update the PLC software via USB sticks.

But on a APC3100, 2200 or also Embedded devices like X20 PLCs, in general you can also communicate to some devices that are using USB RS232 chipsets, for example barcode scanners or RFID readers.
This can be implemented by using the AsUSB library (to identify and access the device) and the DvFrame library to do the serial communication.
Some code samples how to do that are already delivered together with Automation Studio, please have a look to the Automation Studio Help where to find such samples.

It’s important to know, that not every device that uses USB RS232 communication can be used - this is because of embedded systems like Automation Runtime cannot provide as many different drivers as GPOS systems like Linux or Windows.
So we can’t promise that a USB RS232 device will work, you have to try to find out if such a device is accessible with AR (except of devices provided by B&R, for example the RFID reader).

Additionally I’ll share my personal experiences out of a private project:
some weeks ago in my free time, I played around with different microcontrollers to learn a bit more about Arduino and ESP systems. To communicate with such systems, you often need USB RS232-TTL communication chipsets. And for fun, I also tried if this converters can communicate on a USB port of a X20 PLC: with a FT232RL chipset I got a communication up and running, with the CH340- and the CP2102-chipsets I failed (these devices were not recognized by AR)… as I said this was only a private project, and I tried these 3 chipsets because they are the most common ones in use with the named microcontrollers.

And not to forget, here’s a information about the T30: as I know, such Terminal devices support USB mass storage only, if you want to access them by the AR system.
The Terminal device itself does not run AR but a embedded GPOS system. To access a mass storage plugged into the T30 from AR, you have to use the functions of FileIO library with a network-based CIFS access to the T30 (the USB stick is accessed as a “network drive”, the credentials for this network access can be setup in the commissioning pages of the T30.)

Best regards!
Alex

4 Likes

Thank you, this was very useful

1 Like

Thanks for the private project experience sharing. I was in the past thinking about how to connect B&R with my private project running on esp32, and this is good option :slight_smile:

1 Like