Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NIvisaic fails to open serial ports on ENET-485/4 Unknown

I am attempting unsucessfully to configure a 4 port NI ENET-485 Serial Server. I have been able to complete up to Step 7 (verify hardware) in the 'Getting Started with Your Serial Device Server for Linux x86'; however, when viOpen is called as follows:
 
viOpen(0x081484A8, "ASRL::192.168.1.7::1::INSTR",0,3000,0x00000000)
 
It returns status 0xBFFF0011, which is Insufficient location information or the device or resource is not present in the system. I am using Red Hat Linux and am connected to the serial server via a hub. Both computer and serial server are on the same subnet and am able to configure it sucessfully, but it appears that I am not opening the serial ports with the VISA configuration using the viOpen command. How do I change this or successfully configure so that it used the Visa Configurations?
 
A snapshot of my configuration is shown in the attached picture...
 
Thanks in advance for your help, Corrina 
 
 
0 Kudos
Message 1 of 9
(4,671 Views)
Hi Corina,
Make sure you are using a straight though (standard) cable if you are using a hub to connect the ENET-485 to the network, or if you are connecting it directly to your PC, make sure you are using a cross over cable
 
Check the links I have included above for more details if needed.
 
Have a great day!
Chris R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(4,642 Views)
Chris,
Thanks for responding. I am using the correct cable, straight through since I'm connected to a hub. The visaconf program is able to find the serial server and I have successfully reconfigured its IP address to match my subnet; however, I originally had difficulty since I did not have a gateway address defined in my network configuration. The result was that I would get a Dialog box saying "Unable to find dynamic resources" when starting the visaconf program. And when browsing for resources, the serial server was never found. But alas I'm through that hurdle and cannot get over the next.
 
So I have successfully configured the ethernet port of the serial server and have the yellow PWR/RDY light and the green link light. I have configured the following static ports using the visaconf:
 
Resource Name                                       Alias               Device State
ASRL0::192.168.1.7::1::INSTR                port1               STATIC
ASRL0::192.168.1.7::2::INSTR                port2               STATIC
ASRL0::192.168.1.7::3::INSTR                port3               STATIC
ASRL0::192.168.1.7::4::INSTR                port4               STATIC
 
Now when I run the Visa Interactive Control, all of the ports above are listed as Unknown and when I double click on them, the response is as follows: Unable to open session to "ASRL0::192.158.1.17::1::INSTR" Return status code: 0xBFFF0011 Status name: VI_ERROR_RSRC_NFOUND. Insufficient location information or the device or resource is not present in the system. I am monitoring this with the SPY software and the command that it is choking on is:
 
viOpen(0x08128758,"ASRL0::192.168.1.7::1::INSTR", 0, 0, 0x00000000), which has the following variables
viOpen(rmSesn, rsrcName, accessMode, openTimeout, &vi)
 
I was wondering if maybe it is unable to communicate with the resource because the accessMode is not correct. Any ideas on how to change or make my own queries. Or anything else I may have missed.
 
Again thank you in advance for your help, C-
0 Kudos
Message 3 of 9
(4,613 Views)
Have you tried doing a serial loopback test to see if your ENET device is working properly?  Here is a  link on how to do this:
Scott G.
AE Specialist
National Instruments
0 Kudos
Message 4 of 9
(4,595 Views)

Yes, I tried but using cutecom for the linux which did not work as I expected b/c according to the NI Serial Device Server User Manual (Appendix F: VISA and Serial APIs on UNIX): "To access the erial pors on an ENET-Serial box under a Unix architecture sucha s Solaris or Linux, you must use the NI-VISA driver. You can use the device I/O API on these platforms to acccess local serial ports(open, write, etc.); however, you cannot use it to access the ports on the ENET-Serial box. The API on Solaris and Linux was not designed to access remote serial ports and thus cannot support this functionality. 

Assuming that the VISA drivers have loaded successfully since visaconf shows the following Serial ports:

  • ASRL1::INSTR   (/dev/ttyS0)
  • ASRL2::INSTR   (/dev/ttyS1)
  • ASRL3::INSTR   (/dev/ttyS2)
  • ASRL4::INSTR   (/dev/ttyS3)

So, I tried the vxipnp/linux/NIvisa/Examples/C/Serial/RdWrtSrl as root user since the permissions on these are limited and I get the following response: 

Cannot open a session to the device. Hit enter to continue.

And btw, I have a DB-9 female converter plugged into the back of serial port 1 (ASRL1) with paperclips plugged in for RS-485 loopback. But the VISA resource manager cannot even open a session to the device???  At this point I'm thinking about upgrading the firmware, what do you think?

0 Kudos
Message 5 of 9
(4,560 Views)
Can you open a VISA session to communicate through a built in serial or COM port?  If you can't open a VISA session to any devices then it could be a driver issue. 
 
Is there any way you can try the device on another computer (LINUX or Windows) just to make sure it is not a hardware issue? 
 
Thanks,
Scott
Scott G.
AE Specialist
National Instruments
0 Kudos
Message 6 of 9
(4,527 Views)

Good news! I am able to configure the serial server using a WindowsXP laptop... finally some success. I installed the niser320.exe also known as NI-Serial drivers. I had mistakenly installed the wrong software on Windows previously (NI-VISA is not the one to install for Windows).

In response to your suggestion of testing the other ports on the Linux box, I don't happen to have any traditional com ports DB-9, just USB. I'm using RedHat 4 and installing the NI-VISA API only, so I'm going to give it a shot installing the following NI Serial Device Server for linux http://ftp.ni.com/support/softlib/serial/Linux/nisds_linux10.tar Hopefully, this works!  Thanks for your help!

0 Kudos
Message 7 of 9
(4,518 Views)
Finally got it working! The problem was that the NI-VISA-4.2.0.iso drivers were not working under Red Hat Linux 4 workstation. I installed the NI-VISA-4.1.0.iso and was able to add the static ASRL0::192.168.1.7::X::INSTR as mentioned above and this time the VISA Configuration was able to find the resources. I'm off and running now Smiley Very Happy
0 Kudos
Message 8 of 9
(4,484 Views)
Corinna,

I'm hoping you still receive emails when a reply is posted on this thread.  We're having issues communicating with our ENET-485 device on RHEL 4 WS... not the exact same issues as you had, but it sounds like you managed to get yours working, so maybe you'll be able to help us in troubleshooting what may be wrong in our setup.

I started a thread describing our issue:
http://forums.ni.com/ni/board/message?board.id=140&message.id=29841

Please contact me if you get this message.

Thanks in advance for any insight you can provide,
Melissa
0 Kudos
Message 9 of 9
(4,110 Views)