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!
You cannot use same VISA string input for configuring VISA GPIB and VISA USB. Check it out here how to configure VISA USB :
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.
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.
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
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.
What have you tried so far?
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.