Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

After closing a VI, and analog input suddenly turns a device on.

Background:

I have a LabVIEW 7.1, a Real-Time controller and FPGA card. The FPGA vi that I have is mostly IO. One of the IO's on the FPGA is the Analog output that would be controlled by my Real-Time controller that would send 0-10V to a fan motor.

Problem:

While running a test Real-Time VI that opens and controls my FPGA VI through a Read/Write, whatever I'm controlling works fine and in this VI I am not sending any IO to the fan motor. After I close that VI, suddenly, my fan motor gets turned on. Why would this input suddenly send a signal, become active, whatever you want to call it?

Thank you in advance for any assistance.

- Con
0 Kudos
Message 1 of 4
(3,591 Views)
Hi Con,
There is one of two things that might be happening here.
1. The FPGA software and hardware incorrectly write a value to the analog output channel when you stop the FPGA VI.
2. There is some code (that you are not aware of) that is writing a value to the analog output channel.

So, to test the software and hardware issue (#1) try wiring your fan up to a different analog output channel. If your fan does not come on then I would assume that there is some piece of code that is sending a value to the analog output channel that you were previously connected to.

Test the code issue (#2) by writing a very simple FPGA VI that would acquire one analog input and nothing else. Run this VI and see if the fan comes on. If it does then I would assume there is an issue with the hardware and software.

Try these things and let me know how it goes. Also, when the fan comes on, does it stay on or does it come on for just a second and then turn off?

Best Regards,
Brooks W.
National Instruments
0 Kudos
Message 2 of 4
(3,580 Views)
Hi Brooks,

The times I noticed this happening I had created a simple Real-Time VI, that opened an FPGA VI reference, then used Read/Writes to control some digital lines, then closed the FPGA VI reference. After I closed it though is when the Fan turns on and stays on, which is controlled in that FPGA VI but had not been enabled or disabled in the Real-TimeVI that had been run.

I cant test it out at the moment, as its offsite. But any ideas may help.

Even if I had somehow enabled the analog lines in my FGPA VI, wouldn't the fan have gone on while I ran my Real-Time VI and not after I stopped that VI?

Thanks again

- Conrad
0 Kudos
Message 3 of 4
(3,576 Views)
Hi Con,
Even if you are using a simple RT VI which is only doing reads/writes to digital lines the FPGA code still has a control or constant wired into the analog output node. So, even if you are not explicitly controlling the analog output line through the RT VI it will still write a value based on the control/indicator wired into that analog output node in the FPGA VI. What is the value of that control/constant for the analog output node (on the FPGA VI)? You will want to set that value to 0 (on the FPGA VI) to make sure that there is no voltage written out unless you control it via the RT VI.

The strange part about this issue is that the fan comes on after the FPGA VI has been closed via the RT VI. Right now I don't have an explanation for that. Sometimes there is a floating voltage on the analog output line when no VI is controlling it. However, this should be floating and should taper off after a while. Is this what's happening or is it a repeatable voltage value every time? I have tried to reproduce this issue but I don't see the same behavior.

Try these things that I have discussed above and let me know what you find out.

Best Regards,
Brooks W.
National Instruments
0 Kudos
Message 4 of 4
(3,560 Views)