LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRIO-9039 can't run same time as VISA-Read


@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:

  1. 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
  2. I connected my microcontroller's UART to the computer via "COM4"
  3. 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".
  4. I was able to find an NI website that described this issue: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019NYISA2 
  5. 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.
  6. 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:

  1. Create a new VI to do a VISA READ , save this VI in a C:\ folder and not in the CRIO-9039 project.  
  2. 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. 

0 Kudos
Message 11 of 16
(421 Views)

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:

  1. Instead of connecting the USB cable to the computer, I'm connecting it to the USB host on the CRIO-9039 (see pic10).  I re-ran my sensor labview VI and it still doesn't work.
  2. I've tried installing any CRIO software it has regarding the USB. I re-ran my sensor labview VI and it still doesn't work.
  3. I tried looking at the CRIO's USB Configuration Submenu as described on page 37 of this document (http://www.ni.com/pdf/manuals/375697c_03.pdf) and wasn't able to find any configuration to make my UART work with the USB on CRIO.

Am I going the wrong route? How do I connect my UART to the CRIO? Thanks. 

0 Kudos
Message 12 of 16
(414 Views)

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? 

0 Kudos
Message 13 of 16
(409 Views)

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.

0 Kudos
Message 14 of 16
(403 Views)

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. 

0 Kudos
Message 15 of 16
(401 Views)

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. 

0 Kudos
Message 16 of 16
(399 Views)