From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI does not sense signal from instrument

Hi,

 

I am trying to control a deposition sensing device using Labview. The device is connected to the computer via a USB cable. I plugged everything in and when I run the VI it tells me that the device is not connected and that the serial number is not connected. Even after I enter the serial number it gives me the same error message. I restarted the computer and this does not solve the problem. I have encountered this problem before but I kept clicking run and clicking Ok when the error message pops up and somehow the vi ran. I do not understand why the VI is not running since everything seems right about it. I have included the front panel and block diagram screenshots. Any sort of help would be greatly appreciated.

 

Thanks.

 

-Sicelo

Download All
0 Kudos
Message 1 of 14
(2,862 Views)

You've got some unknown device with an unknown method that is generating an error. Don't even know if you are using .NET or ActiveX. Did you add the methods or was this something you got from the vendor?

 

p.s. It's considered very bad style to use a stacked sequence structure. Your use of the three separate '=' functions and three separate case statements is extra code that is unnecessary. Just wire the numeric output to the selector of a single case statement.

0 Kudos
Message 2 of 14
(2,853 Views)

Hi Dennis,

 

Thanks for the prompt reply. I am using a dll driver to control the device. Someone in my lab (they left already) wrote the labview programs (not the manufacturer). How exactly do you wire the numeric output to the selector of  a single case statement? I am relatively new to Labview and do not fully understand the language yet. That would be great if you can walk me briefly through the process. And by the three case statements, do you mean the three mathematical functions (subtract, multiply and divide)?

 

Thanks.

 

-Sicelo

0 Kudos
Message 3 of 14
(2,842 Views)

Sicelo,

  I had the same problems while using a Qpod device a couple of years ago. I never really figured out what the problem was, but the manufacturer provided two sets of software and the LabVIEW version would only occasionally detect the instrument while the other software did so reliably. I don't think the problem is in the LabVIEW code itself, but in the USB driver and DLL. The block diagram you showed looked to me like it is the one that comes from the manufacturer, but updated somewhat from the version (LabVIEW 8.6) that I used. You should start by contacting the manufacturer to make sure you have the latest version of their software and DLL.

 

If you are new to LabVIEW don't worry about people who tell you what is good style and what is bad style. Take what you have and what you know and try to get something that works. You were given a vi with a stacked sequence so leave it that way. When you  are proficient and have some time then you can worry about style points.

 

You have 3 case statements, each wired to a Boolean from an equal  comparison operator (=0, =8 and =7). If you connect the blue numeric wire to the question mark on the case structure it will change from having two cases for True and False to having cases for every integer value. You can then put in code for the integers 0, 8, and 7 and choose what to do as a default case for any other integers.Run the LabVIEW tutorial to learn more about these things.

Message 4 of 14
(2,829 Views)

You don't mention the type of dll - ActiveX or .NET. Provide the information from the vendor. Did the methods ever work? You indicated in a different post that the earlier program used a serial port and not USB.

 

No - not the add/subtract/etc. As I said you have 3 '=' operations (=0, =7, =8). You just connect the blue RtnVal wire to the selector (the '?') of the case statement. It will adapt to a numeric type. You would then have a single case statement where you would create separate cases for 0, 7, and 8.

0 Kudos
Message 5 of 14
(2,825 Views)

Dennis,

 

I think it's an ActiveX. In an earlier I was refering to a different sensor that we used for a different reactor. I just built a new reactor and this one connects the sensor to the computer via USB.

I will try your suggestions and see if they work.

 

Thanks again.

 

-Sicelo

0 Kudos
Message 6 of 14
(2,820 Views)

Doubtful. My suggestions won't change the way you are using the methods and it appears that is where the errors are coming from.

0 Kudos
Message 7 of 14
(2,815 Views)

Hi Richard,

 

Yes, you are right. The block diagram comes with the one the manufacturer provides but I modified it to suit my needs. Before this, I got around the problem of running the modified vi (my vi) by first running the manufacturer's vi and then running the vi I modified. That seemed to work all the time until yesterday when I modified the vi further by converting frequency data to mass data and when I tried running the vi the same way before it gave me the error.

 

I am currently stuck right now. I plan to call the manufacturer and ask them about the software. I don't know how else I can get around this problem. How did you finally solve your problem if I may ask?

 

Many thanks.

 

-Sicelo

0 Kudos
Message 8 of 14
(2,808 Views)

Sicelo:

You should not have to run the manufacturer's first and then run your modified vi to be able to accomplish your
task. The problem must lie in the changes you made to the manufacturers vi since that one is able to
run without issues. I would try looking at both vis and seeing what change caused this error. The manufacturer
should also be a great resource in asking how the vi uses the serial number and this should help you further

comprehend any issues you are getting in your vi. Let me know if you have any questions.

Thanks.


Tori W.

National Instruments
0 Kudos
Message 9 of 14
(2,766 Views)

I think I eventually used the manufacturer's vi with one small modification: I had it write to a shared varialbe in addition to its indicators. Then my other vi used that shared variable to make a graph vs time with vacuum pressure, temperature and other parameters on the same graph.


Richard

0 Kudos
Message 10 of 14
(2,759 Views)