LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

crio serial port

Solved!
Go to solution

Hi

 

Can anybody tell me how to access serial port of crio 9024. I have to transmit data on the serial port of the controller. This transmission must be through crio serial port and not through CSeries module.

 

 

Thanks

0 Kudos
Message 1 of 20
(14,219 Views)
Solution
Accepted by topic author mimran

Hello mimran,

 

cRIO controllers run LabVIEW Real-time.  Therefore, you perform serial read/write through the NI-VISA palette in LabVIEW.  All the data that is collected from the port, or sent to the port will need to be 'String' data.

 

There are examples for reading serial installed with LabVIEW.  These need only a few small changes for working under Real-time.

 

Follow these steps to find an example:

  1. Run LabVIEW.
  2. In the main menu, navigate to 'Help'->'Find Examples'
  3. In the top left, select the 'Search' tab.
  4. Search the term 'Serial'
  5. Open the example called 'Basic Serial Write and Read.vi'

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
Message 2 of 20
(14,206 Views)

Hello George (or anyone else since it is long...),

I tried the serial vi example of cRIO 9075 and tried to send write strings through Tx line on the port. I just do not see anything at the other end (an LCD which needs only predefined serial commands). I have tested the LCD on hyper terminal and it accepts inputs. My application vi runs fine doing everything else, except the serial port output. Any help?

Regards,

Rajeev Dubey

India

 

Rajeev Dubey

Quantum Age Tech Solutions Pvt. Ltd.

India

http://www.qagetech.com

rajeev@qagetech.com
0 Kudos
Message 3 of 20
(13,570 Views)

Hello Rajeev,

 

This is an old post, and I almost missed the reply, but I'll see if I can help.

 

As you have experience with Hyperterminal, have you plugged the serial port of the cRIO into hyperterminal, and see if anything is actually be transmitted?

 

Does the LCD have a microcontroller that interprets the serial commands?

If so, do these commands have to have an explicity baud rate or termination character?

 

Consider looking at this example as a guide for troubleshooting:

Serial Data Transfer Between cRIO and Host

 

In the future, consider making a new post, and just linking an old post.  Hopefully, someone can reply to you much sooner.

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 4 of 20
(13,545 Views)

Hello George,

Thanks for your response. I have been able to solve the problem in between.

The RS 232 serial output from cRIO needed to be converted to 5V TTL serial output. We assembled an interface circuit and it worked.

Thanks,

Rajeev Dubey

Rajeev Dubey

Quantum Age Tech Solutions Pvt. Ltd.

India

http://www.qagetech.com

rajeev@qagetech.com
0 Kudos
Message 5 of 20
(13,542 Views)

Hi Rajeev,

 

That was actually going to be my next suggestion, however, most often the issue is software, rather than logic levels.

 

I am glad to hear that the issue was solved.

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 6 of 20
(13,539 Views)

Hi 

 

I try to collect datas from an external device which is connected to the RS232 port of CompactRIO. And I connect to CompactRIO with Ethernet cable.

 

When I try to collect datas from the external device, my read bytes at the VISA Read function is 0 whereas my sent data with VISA Write function is for example 5 bytes.. I made loopback test to the output of my RS232 cable to see the bytes that I sent, but I still see read bytes as 0.

 

I dont know whether there is a point that I miss, but I need help to solve this problem

0 Kudos
Message 7 of 20
(8,546 Views)

I also have the same issue. Someone help

0 Kudos
Message 8 of 20
(7,921 Views)

Hi nehap,

 

welcome the this board!

 

Which issue do you have? Same to what?

You might start to explain which hardware you use, what you are trying to do and where you are failing in doing so. You may also attach your code or provide any more information being helpful to solve "your issue"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 20
(7,917 Views)

Inially i faced some problem in acquiring data directly from the serial port of crio. Now, the issue is resolved. I have another problem with how to use the crio 9076 with PID control. I have a DIO and Analog output module. Please help.

0 Kudos
Message 10 of 20
(7,910 Views)