02-02-2011 10:08 PM
I have a code for display power of 1936-C optical power meter, connected through USB. I used Newport's instruments drivers, Code works fine some times and displays power when I run it, and some times it does not show any power when I run the code. This happens with any working LabView code that I have to communicate through USB with the instrument.
I created a simple code for SMC100 motorized stage to display and move the actuator, Code does not have any error, yet sometimes it works and some times it does not. Could anybody let me know what is wrong?
02-03-2011 12:40 AM
It will be hard to tell you with only that description to go by, "Sometimes it works sometimes it does not".
Can you post any code or give more details.
Rgs,
Lucither.
02-03-2011 08:08 PM
Hello,
Please see the attachment, this code when 1936-c is connected to PC through USB does not have any error.
If I run the vi, it does not have any error either yet, it does not read power (does not display power).
In Block diagram if I activate the Highlight Execution, I can see the correct instrument address travels to the while loop, passes through Send Cmnd, and then "error -1. or error -2" comes out, this is the only way I can find there is an error. I opened each individual sub vi, I can not find any errors.
All these sub vi are part of the instrument driver of 1936-C that I got them from Newport Corp's website. I mean I di not wrote them.
If I turn power meter on and off, and run the code it start reading power, when I stop the vi, and run it again, it does not read power.
02-03-2011 08:46 PM
You did not include the most important part - the subVIs from newport. If their code does not work, then you should be in contact with them. There are numerous possible implementations of USB communication that they could have used and they are probably the only ones who can analyze the problem and fix it
02-03-2011 08:56 PM
Hi Dennis,
I sent my questions to Newport, I had no response yet, I think the usbDLL.dll is broken, I do not know what it is, I think all subvi are affected by that, Would you think I can get uncorropted usbDLL.dll file some where? is it some thing universal? or it depend to each instrument?
Please see the attachment for subvi
Could you please let me know if there is any solution?
Thanks
Golshan
02-03-2011 08:59 PM
It's their dll. You will just have to wait for Newport.
02-04-2011 07:41 AM - edited 02-04-2011 07:43 AM
As Dennis said it is their dll. USB may stand for "Universal Serial Bus", but the only thing universal about it is the description of the interface, each bit of hardware has its own implementation of what the messages sent are and do. Many companies do use the same .dll drivers, from the company that manufactured the particular USB interface chipset, particularly those that are using it like an old "serial" port, but even then they sometimes encapsulate the calls to that lower level .dll in a .dll of their own, some of which I have found don't play nicely with LabVIEW. I haven't any experience with your specific instrument.
Another thought is that you are loosing the usb connection from your computer, as you mention a problem with an XY stage? Is that also part of the power meter code or seperate? I had problems about a year ago where occasionally the USB on the test computer would "glitch", causing, in my case, the USB to Serial adapter I was using to be "reinstalled" by Windows, resulting it this case in a new com port #. My program had no way of knowing that this had happened, or what the new port mapping was. The final resolution, with NI's support telling me that they had seen problems with certain motherboard's USB, was to plug a USB adapter board into the computer's motherboard for my instruments and comm ports. Since your problem seems to be corrected by power cycling the instrument I'm wondering if Windows is intermittently loosing communications with it. Here is a fairly lengthy discussion about what I went through to find the problem.
Good Luck, let us know of your progress so we can help, or learn.
02-04-2011 10:30 AM
Hello LV_Pro and Dennis,
I am still waiting for Newport's response on dll file!!
Thank you for your input I will post my experiences soon.
08-12-2011 11:48 AM
Hallo all who read this thread,
I have also a similar problem that Salam has faced.
I am trying to program newport optical power meter 1936-c in Labview but could not communicate with the instrument over USB connection.
I have installed the drivers necessary for the operation of the optical power meter from newport website:
ftp://download.newport.com/Photonics/Power%20Meters/x936-C_x1928-C_1918-C_R_%20Software_Suite/
I am running windows XP service pack3, 32 bit version.I believe I have installed the correct version of the driver for communication with the device over USB connection.The application software provided by the newport runs correctly, and I am sending and receiving the commands,but when I try to connect to the power meter using Labview sample programs provided by newport, I am not able to send or receive anything,instead the program seems to run an infinite loop and i get no reply until I have to restart the program.I am using Labview service pack 9 and I have tried all the sample programs 7.x ,8.x and 2009 version,but unfortunately no progress(:
I am interested to get power from the meter using power command PM:power?(no smiley) .But it doesnot give anything.Instead it gives an error response"could not connect any USB device".Is it the problem of compatability or some driver issue?as i got some warning messages in the begining(see attached file).The warning seems to occur due to USBWrap.DLL,may be I am using some old version of USBWrap.dll?.I could not understand what the problem is exactly(:
I have attached some screenshots of the program I am currently using and the Labview program provided by newport.
@Salam, did your problem solved?Can you please share the program you used to get power.I tried to open your file (NP_DataStoreSample_LV8.llb) but it seems to be version 2010,so i could not open with my version 2009.Do you have some program for Labview 2009 version.Thanks!
I would highly appreciate if someone could help me.
kind regards,
shami
08-12-2011 01:13 PM
Hello IC_designer,
I had to give up and buy Thorlabs' optical power meter, I will post NP_DataStoreSample_LV8.llb in LV 2009 soon.
Thanks