05-02-2018 05:00 AM
@amyle wrote:
Hi,
My goal is to be able to control some motors in real time using the CRIO-9039, and at the same time, capture some sensor data using a microcontroller via VISA READ. Here are my steps:
- To synchronize motors and sensors data, I need to be able to do a VISA READ in the same VI as my CRIO-9039 project
- I connected my microcontroller's UART to the computer via "COM4"
- However, when I add the VISA READ to a VI in my CRIO-9039 project, I don't see the VISA Resources "COM4"; I only see "ASRL1::INSTR", "ASRL2::INSTR".
- I was able to find an NI website that described this issue: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019NYISA2
- I followed the advice from this NI website (see pic 1 in attachment). However, when I went back to the VI in the CRIO-9039 project, I am still UNABLE to do a VISA READ. There's no error that pops up and the VI still runs, but I'm continuously getting 0 from the VISA READ.
- Am I configuring the Devices and Interfaces incorrectly? How come I keep reading 0 from VISA READ?
To verify that my VISA READ and hardware are functioning correctly, I did the following:
- Create a new VI to do a VISA READ , save this VI in a C:\ folder and not in the CRIO-9039 project.
- When I look under the Visa Resources, I can see the "COM4" (see pic3). If I select "COM4", then I can run my VISA READ and capture sensor data just fine.
Thank you.
For 2 and 3, the cRIO can NOT see the COM port in your PC, it is a hardware in your PC that is not shared with a cRIO.
If you want the cRIO to read something from a UART, you need to connect the UART to the cRIO.
05-02-2018 02:24 PM
Yes, that's exactly what I want to know - how do I connect my UART to CRIO?
Here are more steps I've tried to connect my USB cable (and thus UART) to the CRIO:
Am I going the wrong route? How do I connect my UART to the CRIO? Thanks.
05-03-2018 01:24 AM
What UART are you talking about?
Does it need drivers? Is these drivers able to run on Linux for the version that the cRIO has ?
Are you sure that the Linux has seen and mounted the USB port correctly? You could try to reboot the cRIO while you have plugged in the USB device.
If the cRIO can work with your USB device as a COM port, you should be able to see an extra COM port in MAX undder the cRIO.
Why not use true UART, and connect to the cRIO's RS232 port?
05-03-2018 11:39 AM
Hello,
I'm using an MSP430F5529 microcontroller to read some sensors, and the data from these sensors are passed through UART via USB to the computer so Labview can display these sensors data. It doesn't need drivers, and I've been using the VISA READ to capture the UART in Labview.
USB for CRIO should be connected correctly. I plugged a keyboard to it to access the CRIO's BIOS setup, and it was working just fine.
Yeah, I see that the CRIO has RS232 and RS485. Is it possible to use the CRIO's RS485 as well to read the sensor data instead of USB? My MSP430F5529 has a micro-USB connector to its UART, and I'll need a dongle to convert from micro-USB's UART-to this RS485/232. I'll give it a try.
05-03-2018 11:54 AM
You have to use the RS232 on the cRIO, do not use the RS485, as that is something different.
Just because you can plug-in a keybord or a USB-RS232 dongle into windows, does not mean that you don't need a driver. Every USB device needs a driver. But windows has a lot of driver already, and it will try to install the driver for you when you plug-in your USB device.
Linux is another thing, you need to do some more work for it to function, and the Linux version that is on the cRIO might not have the driver for your USB device. But it has a base keybord driver, to handle any keybord plugged in to the USB port.
05-03-2018 01:01 PM
Ok, RS-232, got it, I'll look into that.
As for the CRIO's USB driver, I've installed anything related to USB for the CRIO (see attached pic20). Is this the correct driver or do I have to install something else? Thanks.