05-09-2014 11:02 AM
HI everyone,
I am trying to control a Newport SMC100PP motorcontroller using LabVIEW. I have been controlling it for a while using a Windows XP machine that runs LabVIEW 2011 but now need to control it using a 64-bit Windows 7 machine that runs LabVIEW 2012.
I can currently control the SMC100PP on the Windows 7 machine using their given utlity but need to get it working with my old code. After making sure my SubVIs were in the correct folder, I have the code running without the broken-arrow run errors. However, although the code runs, it doesn't actually communicate with the SMC100PP.
After I fixed the initial broken-arrow arrows, I had an error "-1073807195." I fixed this by installing the NI VISA prgoram that contains NI I/O trace. Now, it runs without generating any error codes, but still does not communicate with the SMC100PP.
I am running the NI I/O Trace program and am comparing what the Windows 7 machine sends compared to what my old Windows XP machine sends.
My Windows 7 machine sends:
VISA Open ("ASRL3::INSTR", False, 0, 0, "ASRL3::INSTR")
My Windows XP Machine sends:
VISA Open ("ASRL3::INSTR", True, 0, 0, "ASRL3::INSTR")
I traced this VISA command to an Open Serial Driver.VI that is a part of the given Newport SMC100PP subVI Port Init.VI. It seems that this port is not actually initializing on the Windows 7 machine.
Does anyone know how to fix this?
Do I need to reinstall drivers, change my code, or something else? Why would it work on the Windows XP with LabVIEW 2011 but not on Windows 7 with LabVIEW 2012 when everything else works?
I appreciate any help you can give.
05-09-2014 11:07 AM
Are you getting any errors out? Are you sure that port is correct configured IN WINDOWS? Can you communicate with the microcontroller through MAX?
05-11-2014 04:40 PM
Hi crossrulz,
Those were some good questions and I looked into it further and my port configuration is all screwed up and I don't know how to fix it. I think the problem is with the VISA. After some research, i discovered that NI and Agilent use different versions of VISA. I am also controlling a Agilent Oscilloscope.
On my Windows 7 machine, I installed the Agilent DSO6302A oscilloscope first and am able to control it using LabVIEW. Then I installed the SMC100 code and I cannot control the motorcontrollers using LabVIEW but was able to using the Newport utility. Now, I see both devices in NI-MAX as USB devices. In Device Manager, I only see the RS232 converter for the mircocontroller as a NI-VISA USB Device (It used to show up as a COM port device) and the oscilloscope doesn't even show up. I can no longer control the SMC100 at all since the COM port disappeared since Friday. Agilent Connection Expert shows the oscilloscope and a COM port that it cannot communicate with.
On my Windows XP machine, I had LabVIEW controlling the SMC100 motorcontrollers first. Then I installed the drivers to control the Agilent DSO6302A oscilloscope. I can still control the motorcontrollers using LabVIEW but not the oscilloscope. I only see the SMC100 (as a RS232 COM device) in NI-MAX, but see both in the Agilent Connection Expert with the oscilloscope via USB and the motor controller via COM3. I cannnot find the oscilloscope in device manager but can find the motorcontroller. The SMC100 is connected by a RS232-USB converter and appears as COM port 3.
On both machines, when I try to control the device that doesn't work, I now get the error code: "-1073807343" in regards to VISA Open.
According to Agilent Connection Expert, my VISA status is: "64 bit: 2 providers; 32 bit: Agilent VISA is secondary".
So, it looks like the two different VISA's are not playing nice with each other. Do you have any suggestions?
Thanks for your help!
05-12-2014 02:36 PM
Update:
On my Windows 7 machine, I uninstalled all instances of Agilent VISA and reinstalled the FTDI driver for the SMC100 RS232-USB adapter cable and updated the NI-VISA. I no longer have any run errors, but get the same no-error but not working as from my initial post.
The SMC100 is now back as being identified as COM port 3.
05-12-2014 03:31 PM
Another update:
I restarted the Windows 7 machine and although there are no reported errors in opening the com port, any LabVIEW code that tries to talk to the SMC100 returns the error 999:
Error on Read:
RS-232 No Data Available
at time of read.
05-13-2014 01:45 PM
Hi efcloos,
Can you provide any more information on the error you are receiving? Are you trying to communicate with your device via MAX test panels or LabVIEW? Any code you could post would also be helpful. Thanks!