Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot "see" USB/RS485" device?

You didn't understand what I said. The fact that it's a half-duplexed device is completely irrelevant. All that matters is what commands the motor understands. I have yet to hear from you that you've actually OPENED THE MANUAL AND READ IT to see what commands the motor understands. If the motor does not implement the *IDN? command, then it's not going to respond, regardless of whether it's a half-duplex or full-duplex.

 

**Yes, I did read the manual and *IDN is not a command listed as recognized commands.

 

 

There can't be an "automatic appending" by the motor. You're the one responsible for that. HyperTerminal is adding the carriage return for you. The vendor's software is probably doing the same thing. You don't see that on the screen. Apparently, I can't repeat this often enough: OPEN THE PROGRAMMING MANUAL FOR THE MOTOR AND READ IT. See what it says about terminating commands. See what it says about the list of commands it understands. See what it says about how to format the parameters for the commands.

 

**  As I said, I did read the manual and I  spoke to the tech support people about formatting commands for the controller, and they are saying that the commands need to be terminated with R and then a carraige return is entered to execute the command.  The controller responds to commands from Hyperterminal.  I was told by the vendor that their software does not add a carriage return.  Instead, there is a SEND COMMAND button on their interface, so, maybe that is the equivalent of a carriage return.

 

You do not need DAQmx. You only need DAQmx if you have a data acquisition board. When you uninstalled the vendor software did you also uninstall the drivers for the RS485 controller?  Which cable are you trying to use? If you're using the NI cable then you'd need NI-Serial.

 

 

***  The drivers for the USB to RS485 converter were not uninstalled.  I have always had NI-Serial installed.  It was also uninstalled and re-installed.  I am using both cables to try to debug this.  The USB/RS485 cable works fine with Hyperterminal.  When I use the VISA test panel on the Agilent 34401, the device beeps and shows ERROR on the screen.  The VISA test panel shows a long string of jibberish in the viREAD box.

 

***  Today, I have uninstalled (did NOT re-install) the drivers for the USB to RS485 converter, but, the RUNTIME error persists.

 

When you were communicating with the 34401 were you using the VISA test panel, or the instrument drivers? Havbe you verified the settings on the meter to make sure they haven't been changed?

 

****  The communication with the 34401 was through the VISA test panel, but, the Agilent drivers were installed also.  I didn't know you could choose one or the other.  I was told that in order to communicate with the Agilent device, the drivers for the Agilent device must be installed also.  To my knowledge the drivers for both the USB/RS232 and the Agilent 34401 are installed on my machine  The Aglient driver is "Agilent IVI Driver 1.2.2.0."

 

As for the issue with COM3, does it show up in the Windows Device Manager? If it does, then it will show up in MAX. If it does not show up in the Windows Device Manager, you may need to reinitialize the MAX database. There is also a tool in the NI Community, but I have never used it, so I cannot attest to its effectiveness, or lack thereof.

 

***  The COM3 does NOT show up in Device manager (unitl a converter is plugged into USB port) but it shows up in MAX, even before any hardware is plugged in.  Although, this is intermittent.  For example, today, nothing is showing up in MAX under devices and hardware.  Since I uninstalled MAX and reinstalled it, why would COM3 continue to show up before anything is plugged in?  How does a newly installed MAX already know about a COM3 that existed in the previous installation, INCLUDING THE PORT SETTINGS FROM A PREVIOUS INSTALLATION even when that device is not plugged into the PC?  I used the articles in the knowledgebase to address the corrupt installation, however, that did not repair the RUNTIME error.  See the screenshot attached.  In addition, when I plug in both the USB/RS232 converter and the USB/RS485 converter, the MAX and the WINDOWS device manager show COM4 twice!!!  They list them one above the other in the device manager.  One of these can be changed to COM5, but, initially, they show up as the same COM4 port. 

 

When I plug the NI USB to RS232 cable in, a windows message bubble pops up in the lower right hand corner of the screen that says "there was a problem with the new hardware installation...device may not work right.." or something along those lines..the bubble disappears quickly.  See the lower screenshot on the attachment, which results after plugging in the NI USB to RS232 converter and selecting DEVICES AND INTERFACES.  This device shows up on COM4 in the device manager with no indication of error.

 

0 Kudos
Message 11 of 16
(2,145 Views)

We were able to resolve the communication issues to both the Agilent meter and to the motor controller by uninstalling NI Serial 3.7.0 and downgrading to 3.5.1.  The rev 370 is the most current, but would not recognize the NI USB/RS232 converter.  It repeatedly gave the error, "can't find necessary software" to complete installation.  The NI USB/RS232 showed up in Windows Device Manager as "Other Devices" with a large yellow question mark and ! indicating error.  Once the rev 3.5.1 was installed, I am able to send commands such as *IDN?\n to the Agilent and it answers as expected.  Also, I can use the VISA test panel to send commands to my motor controller, and it works as well. in addition, ALL the other NI software was uninstalled and re-installed, and several Windows utilities were run on the hard drive to clean it up, like Defragment and Checkdisk etc.  

 

We have still not resolved the Visual C++ Runtime error 6030  -CRT not initialized.  I am waiting for instructions from NI about how to resolve this error.

0 Kudos
Message 12 of 16
(2,131 Views)

Hi Dav2010,

 

Just so that the troubleshooting steps I sent you to try to resolve the c++ runtime error are available to everyone, I am going to post the steps here as well.

 

1) Open up the windows registry editor. (start-> run -> type regedit and hit enter) or (win key + r -> type regedit and hit enter)
2) In the registry editor's left pane, Navigate to to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\rskcore
3) Look for the key with the name UviProcessExcludes
4) right click and choose modify
5) if there are existing values for Data, go to the end and enter ";NIvisaic.exe" (Case Sensitive, and without the quotes)
        if there are no values, enter "NIvisaic.exe"  (Case Sensitive, and without the quotes)
6) close the registry editor and reboot the computer.

 

Let us know how this works when you get a chance!

 

Cheers!

TJ G
0 Kudos
Message 13 of 16
(2,123 Views)

Sorry, thought I had answered you.  Yes, I checked the manual and there is no *IDN? command listed for the motor controller.

0 Kudos
Message 14 of 16
(2,107 Views)

Then if it doesn't implement the command, why do you keep expecting to get a response to that command?

 

Since the manual tells you that commands need to be terminated with a carriage return, then that tells you that you need to append a carriage return to your string that you feed to VISA Write. HyperTerminal does this for you, and the vendor's software does this as well. That's why those work and your code does not.

0 Kudos
Message 15 of 16
(2,097 Views)

Thanks, yes, I stopped  expecting a response from that command several days ago after your suggestion to check the commands list.. We have resolved all the communication problems with the implementation of the NI Serial 3.5.1 instead of the 3.7.0 version.

0 Kudos
Message 16 of 16
(2,091 Views)