04-11-2017 09:48 AM
Hi, I have an Arduino Mega and I would like to connect it through the USB port of the Compact Rio 9081 and read a serial string.
Is this fairly straightforward?
If not I will have to connect directly to my PC and pass the data back to the cRIO.
04-12-2017 06:40 AM
Hi David,
Normally I’d say no - as per the Specifications Datasheet “The USB device port is intended for use in device configuration, application deployment, debugging, and maintenance.” Since the cRIO controller is running a RTOS instead of Windows, the USB interface must be specifically configured for each type of supported device. In this case, the USB interface on the cRIO is configured to work with USB mass storage devices (flash drives, hard drives, etc.) or to communicate with interface devices (mice, keyboards, etc.). All other USB devices are not supported.
However…
There are a couple of points that make me a little more optimistic.
One: If all we’re hoping for is a simple serial string, this moves away from the driver based communication the above is referencing. I’d be tempted to give it a try and see what we get back. Can I Control a USB Device with NI-VISA on a Real-Time Controller? may be an interesting resource to check out.
Two: are you running Phar Lap ETS or Windows Embedded Standard 7 (WES7)? I feel like we have the biggest chance of success with WES7.
Fall-back? Your device does include serial connection ports on the front of the device, for both RS-232 and RS-485/422 communication. It might be worth considering the use of a USB to D-SUB serial cable, combined with an S8 serial cable to connect from the D-SUB connection.
Let us know how it goes, I’d be interested to know the answer!
Kind regards,
Rebecca