Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Can VISA be use on CRIO for Ethernet Instruments

Solved!
Go to solution
This seems like a simple question, but I saw a thread online indicating that you could not use CRIO to communicate to an ethernet device using VISA...only the base TCP-IP drivers.  It was in 2008, but did not see anywhere that is says you can.  I am using 2009.  I have another engineer working on this and they haven't been able to get it to work, but I haven't jumped in yet as I am swamped with other stuff.  Just wondering if someone online knows right away if it is possible.  Thanks!
0 Kudos
Message 1 of 14
(6,849 Views)
I tried it out and it doesn't seem to work.  I was able to get it to work with the fundamental TCPIP drivers, but that doesn't make my life too easy as I have to write and debug the drivers again.  I was trying

 

TCPIP0::169.254.47.101::3000::SOCKET

 

Is there something else that needs to be specified or not specified when using VISA on the CRIO?  Or is it just not supported?

 

Thanks

0 Kudos
Message 2 of 14
(6,834 Views)

Yes, you should be able to use VISA command on your Real Time VI so you can communicate over the built in serial port. In order to do this you will need to make sure you have the VISA driver installed on the cRIO.

 

Check out this example that shows how to set up a serial server/client between your cRIO and Host.

Serial Data Transfer Between cRIO and Host
 

Message Edited by Hueter on 01-22-2010 06:29 PM
0 Kudos
Message 3 of 14
(6,823 Views)

For ethernet???  If I wanted to use the serial port that would be great, but I have two instruments that I need to communicate with which is why I chose a hub ethernet solution.  Am I missing something?

0 Kudos
Message 4 of 14
(6,817 Views)

If you want to use a premade Ethernet instrument driver you need to make sure it is compatible with the Real Time OS. Otherwise you can just use simple TCP/IP commands to build your own. You should be able to do most basic types of internet communication.

 

Hunter

0 Kudos
Message 5 of 14
(6,801 Views)

klessm1,

 

Actually Ethernet resources are supported by VISA on cRIO targets. The passport, NiViEnet.out, should be installed to /ni-rt/system/vxipnp/VxWorks/bin/. If the passport is indeed installed on your system, could you tell us a little bit more on what you meant by "not work"? How exactly are you interacting with the SOCKET resource and what error did you receive?

Regards,

Song Du
Systems Software
National Instruments R&D
0 Kudos
Message 6 of 14
(6,775 Views)

I will check if it is there, but I made a call to NI support yesterday and they came up with the same conclusion that it wasn't supported.  It may be because I am using a 9004 controller?

 

Here was my test:  I have my laptop, crio, and ethernet instrument (socket only) hooked to a hub (not a router).  Everything is set to the same subnet.

 

I perform a VISA open and close on TCPIP0::169.254.47.101::3000::SOCKET from my host and pass back the error.  No error as I can establish the connection.

 

I then move the same vi over to the crio target and run it there.  I get a VISA open error - not enough information or device not present in the system. 

 

Also, when setting up a TCP instrument from max on the crio, it does not allow me to continue (indicates it is not supported).

 

Note this instrument cannot be run using the LAN based instrument configuration  (TCPIP0::169.254.47.101::INST0::INSTR) from host or crio, only the socket configuration.

 

The NI support guy said he looked it up in a table some where that indicated that it was not supported?

0 Kudos
Message 7 of 14
(6,771 Views)

klessm1,

 

I'm not sure what table were used, it was probably out-dated. As of VISA 4.4, the Enet passport is supported on cRIOs. If you are using an older version, you might want to upgrade to the latest VISA (download Link).

Regards,

Song Du
Systems Software
National Instruments R&D
0 Kudos
Message 8 of 14
(6,763 Views)

I have VISA 4.5.1  and VISA Server 4.5.1 on that system.  For some reason that crio (9004) did not have the vxworks directory on it.  Maybe it needs to be scrapped and reloaded.  A 9072 that I have does have that directory.  I will try a quick TCIP test on that (I can't use this one for the solution though because it doesn't have enough memory). 

 

Kind of off topic, but one of the reasons I did not reload it while debuggin ws that everything looked up to date (RIO 3.2.1) and it also had NI-CAN 2.6.3 on it.  When going through the reload it indicated it was going to remove the NI-CAN, but we need it for a CAN module we are using.  I have NI-CAN installed (I even reinstalled it from a download), but it doesn't seem to show up.  Would I need to use the drivers DVD to do a special install for CAN for realtime on my host instead of just the NI-CAN drivers that can be downloaded seperately?  I know it is off topic and all, but since I have a crio expert here.

0 Kudos
Message 9 of 14
(6,758 Views)
The 9072 VISA tcpip test worked.  I will try to reload the 9004 tomorrow to see if I can't get it to work.
0 Kudos
Message 10 of 14
(6,750 Views)