LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling a MyRIO over a wireless RS232 connection

Hi, I am creating a data logger from a MyRIO. I want to connect it to a computer using RS232 wireless transceivers (XBP08-dpsit-024).

I have got the two transceivers talking to each other using the continuous serial write and read VI before. So my plan is to deploy a vi as Real-time on the RIO and then open a vi on the host PC to control the logger. Aside from controlling the logger I would like to be able to send files from the RIO's onboard memory to the PC as well but that is another thing. From what I have figured out so far. I will need to set up a connection using the VISA functions in LabVIEW (2017). Once the connection is going I can send button presses as VISA commands. The RIO will recieve these commands and then I can get it to react accordingly. Is this the right way of going about it? If so, how can I go about learning the language for VISA commands? Thanks for your time!

0 Kudos
Message 1 of 5
(2,224 Views)

NI-VISA is an abstraction layer that handles interface specitics, all you really need to know is VISA Write sends data to your instrument and VISA Read receives data from your instrument.

 

What that data is and does depends wholly on the instrument you are working with. 

The "language for VISA commands" is the commands the instrument you are communicating with uses.

 

For instance a DC power supply will have commands to set voltage, current levels, and turn on/off the output.

A voltmeter will have commands to set ranges, ac/dc, and take measurements.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 5
(2,208 Views)

So in my case the devices are a wireless transciever (an Xbee) and a MyRIO. If I use the VISA functions like the Continuous Serial Read and Write vi. I can send strings from the PC to the RIO. In the example vi, these strings are called commands. Will I have to send strings and have the RIO check for certain words in the string and do an action if they are there? Or are there specific commands that I can send that the RIO will recognise and as a result toggle some booleans.

0 Kudos
Message 3 of 5
(2,198 Views)

Well I haven't worked with a MyRIO so I really do not know, but I am guessing it is up to you to program the MyRIO.

 

So the MyRIO is only going to respond to the commands you program it to respond to.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 5
(2,196 Views)

That makes sense. I'll give it a try and update you. The RIO is programmed using LabVIEW so would you have any advice on programming commands into LabVIEW. I think I'll be able to do alright myself but it never hurts to get tips.

0 Kudos
Message 5 of 5
(2,191 Views)