09-17-2014 03:41 AM
I'm trying to control a monochromator device using Labview, via USB (COM4 port). We did it in the past, using our old monochromator, via GPIB, and it worked well. Now we installed the new monochromator including drivers. We can communicate with it using Hyperterminal, but Labview does not see it. Exactly the same program does work on the old monochromator.
I'm using Windows 7, Labview 2011. The error message reads 'The resource is valid, but VISA cannot currently access it'. Do we need to modify the program when using the COM-port instead of GPIB (apart from the resource name obviously)?
Thanks a lot for your help!
09-17-2014 04:19 AM
Hi DVD_11,
You cannot use same VISA string input for configuring VISA GPIB and VISA USB. Check it out here how to configure VISA USB :
http://www.ni.com/getting-started/set-up-hardware/instrument-control/usb-connect.htm
BR
Vincent
09-17-2014 07:00 AM
If you were using VISA, then you should just have to change the resource name in your code.
Did you still have Hyperterminal open when you started LabVIEW? That would be a resource conflict. Only one program can have access to the port at a time. I would recommend shutting everything down and then try opening your project and run it.
09-17-2014 07:17 AM
Hi Vincent, crossrulz,
Thank you for your help.
For clarification: it seems in MAX that it is not directly a USB port, but an artificial serial port (COM), as you can see in the screenshot I attached.
I made sure no other programs were using this port. I also thought that only changing the resource name would be sufficient.
Now the error that I get is this one:
VISA: (Hex 0xBFFF003A) Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state)
When I open a VISA Test Panel (from MAX) and open the tab 'View Attributes', I see an error at the attribute 'Is Port Connected', saying that there is an invalid property value, and displaying this error: VISA: (Hex 0xBFFF001D) The specified attribute is not defined or supported by the referenced resource.
I hope this information will be useful to you. I'd be grateful to hear any suggestions to solve this problem.
09-17-2014 07:22 AM
Try out to fill in the VISA ressource name following this description in your VI or/and MAX :
USB[board]:: manufacturer ID:: model code:: serial number[:: USB interface number]::INSTR
BR,
Vincent
09-17-2014 07:37 AM
Where can I find all these numbers? As you can see, there is no USB device listed in MAX (except for the one shown as COM4 port). In the latter case, ASRL4::INSTR is the name given by MAX, and using this in the VI gives exactly the same result.
The manufacturer of the instrument does not have specific information on this issue and says it is a Labview-related issue, since it is working fine with Hyperterminal.
09-17-2014 07:52 AM
09-22-2014 02:36 AM
Does anyone has an idea what I could try to make it work? Thanks so much in advance!
09-22-2014 08:49 AM
What have you tried so far?
09-22-2014 08:56 AM - edited 09-22-2014 08:57 AM
@DvD_11 wrote:
Does anyone has an idea what I could try to make it work? Thanks so much in advance!
For using VISA you need to either free resources or use free resources. In your case your VISA is already connected to something else or being used by other devices.