Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i read from a RS-232 to cRIO

I have a board with RS-232 and connected it to a cRIO-9014, whats the easiest way to read the streaming inputs using LabVIEW?

0 Kudos
Message 1 of 10
(6,360 Views)

The first thing you have to do is write an RT VI on the cRIO that acquires the data and then use VISA on the cRIO RT code to output data on the RS-232 port.  Then you need to write a VI on whatever target the RS-232 cards is on to read the data you output.

 

However, why don't you simply use the cRIO on the network and use LabVIEW to communicate the data back and forth.  You'll have much more functionality and be able to get your data much faster through the standard method.  Not to mention you have to use LabVIEW already to deploy the code to the cRIO, it's already all set up and ready to go. 

0 Kudos
Message 2 of 10
(6,338 Views)

I also have a board with RS-232 and connected it to my cRIO-9012. I want my 9012 send data to my board in RS-232 to control the relay on my borad. 

I create a vi on the cRIO and put the visa configuration Vi in the  block diagram. However I found there is no visa device only 'RIOO:INSTR' 

What can I do?

Thanks...

0 Kudos
Message 3 of 10
(5,981 Views)

Hey Bigboycom,

 

It sounds like you have one of two issues. First, you must make sure that you have NI Serial RT and NI VISA installed on your cRIO controller--these will be readily apparent in the add/remove software section.To confirm that this is installed, open up the devices and interfaces on the target, as shown here:

2313.png

Second, you must add the device to your project, right click on it, and connect to it. This allows labview to confirm that there is a serial port available. You can also manually set the visa alias to be the string ASRL1::INSTR, which is the default for the COM1 port.

0 Kudos
Message 4 of 10
(5,949 Views)

Smith, your replay is really helpful, thanks so much.

I think I know the problem. I got NI-RIO 3.4 on LabVIEW8.6 and only minimum package is installed on 9012. Therefore my serial port in not found.

Is that right?

I'm going to get NI-RIO 3.3 at once and see if the problem is solved.

Thanks again~

0 Kudos
Message 5 of 10
(5,942 Views)

Yes, thats right. When you install the serial driver you will see that port.

 

As to that rio version, I would actually recommend pairing RIO 3.6 and serial 3.7, as they are the newest drivers. However, you should have the capability to see that main com port even with rio 3.3.

 

Good luck.

0 Kudos
Message 6 of 10
(5,920 Views)

Hi everyone!

I have a problem with working with dataflow from RS232. I recieve data from rs232 , but I want to check byte that I have already read . Similarly, it have the same function in C language (Flag - if that byte had already read, the computer pass it and read the next byte). In labview, it has function similar to C language...

Please give me some advice to handle this problem

Thank you so much!

0 Kudos
Message 7 of 10
(5,814 Views)

JoJa,

 

I'm not sure if I understand your problem correctly.  Could you perhaps provide a little more detail or a picture or simple VI code that illustrates your issue a little more clearly?

 

Which module are you using with your cRIO? Are you trying to use the comm port on the controller? Also, have you tried looking at a standard shipping example in LabVIEW for help getting started programming with your hardware?  Go to Help » Find Examples and search for "serial" or your particular hardware to find basic examples on how to read and write from serial ports.

 

 

0 Kudos
Message 8 of 10
(5,797 Views)

I should not update to RIO 3.6 follow your advice....

Again, only minimal package is available and no com port. And whats more, there is no option under cRIO. I can't install software and can't change ip even I formated cRIO.

cRIO drives for Labview 2009 is too bad!

0 Kudos
Message 9 of 10
(5,738 Views)

Hey Bigboycom,

 

Use the driver suggestions found in this document to determine which version you should use.  You should also make sure that you have the same driver on your computer as you have on your controller.

 

It looks like you have tried reformatting the cRIO controller.  If you have, could you go to link I have provided below and make sure that you followed these steps.  I hope this helps!

 

Reformatting the Internal CompactFlash Memory on Real-Time Controllers

http://digital.ni.com/public.nsf/allkb/E06ECFE7BF1FA9D3862574F300763DCF?OpenDocument

 

-Cody C

0 Kudos
Message 10 of 10
(5,701 Views)