LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initializing NI-9478 with FPGA

Solved!
Go to solution

I have a very simple labVIEW FPGA VI.

I have already tested both cards with the front panel in NI MAX. I can set any of the Digital Outputs to High and I can see the current flow through the my current card ( NI-9227). I have also confirmed this with a digital multi-meter Mod5 appears to be reading values so no problem with the majority of my Block Diagram.

 

 

My problem is when I am trying to program a simple toggle switch; I can't seem to set the Mod4/DO0 to high.

 

What is wrong with the lower half of my block diagram?

 

Download All
0 Kudos
Message 1 of 12
(502 Views)
Solution
Accepted by topic author eli.barber

Have you tried running the shipping example?

Maybe you need to configure the current limit?

<LabVIEW>\examples\CompactRIO\Module Specific\NI 9478\NI 9478 Getting Started (FPGA).vi

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 12
(464 Views)

The NI 9478 is a sinking digital output. It is an SSR switch connecting the output to ground when activated (output low == 0).

When you set the output high == 1, the switch opens and the output is high impedance. This is basically what is also called an open collector output. You need to use an external pull-up resistor to have a defined high voltage level.

rolfk_1-1719990137310.png

 

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 12
(443 Views)

I have a power supply connected, to the NI 9478. I am able to measure current when I switch it on and of in a test panel using NI MAX (switching also from FPGA to real-time NI-DAQmx).

 

What Does work for me is Moving the on switch inside my loop like so. But I have no idea why that loop could lock out the outside process.

0 Kudos
Message 4 of 12
(423 Views)
Solution
Accepted by topic author eli.barber

All,

 

Replaced my Sequence struct with a shift register and logic

1. Was ON, is ON

2. Was ON, is OFF

3. Was OFF, is ON

4.Was OFF, is OFF

 

Now this seemed to work... lol. Is this ideal? Could I make my code more clean?

0 Kudos
Message 5 of 12
(405 Views)

Using the NI-9478 (for PWM) and NI-9227 (current measurement).

 

My current measurement seems fine. and I KNOW with my multi meter I am measuring voltage when i use a switch.

 

But when I use even the NI example. The LED lights up on the screen, but I measure no change in voltage over the multi meter. Do i need to change DO0 to some kind of PWM mode?

Download All
0 Kudos
Message 6 of 12
(391 Views)

Do you know what an open-collector output is?

Can you draw a schema of what you try to measure and how you connected everything to the connector?

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 12
(346 Views)

Major update. See attached photos of scope while running VIs

 

1. When using the Test Panel, I get the expected output. Full current flow from my power supply.

 

2. When using a simple FPGA loop with a push button, I get a extremely fast PWM instead of a constant ON!

 

3. This is what happens when I use the NI PWM example too. Because it doesn't stay on--rather it pulses on. So a duty cycle that should be 50% is more like 10%. ( was able to get some flow by increasing lowering the number of ticks per cycle. But a low frequency results in only <5% duty cycle when it should be 50%. In fact, at the lower frequencies my duty cycle becomes so low that I don't even see any significant increase in current when using my Digital multi-meter.

 

How can I program my FPGA to stay/keep on instead of Pulse the way it does?

0 Kudos
Message 8 of 12
(309 Views)

rolfk,

 

I don't think this applies to my situation, I don't want the switch to be normally open, I just want it to keep open/high when set it to high in FPGA Mode.

 

When I am in Real-Time (NI DAQmx), with the test panel I can switch High or low and maintain a constant voltage. However, a simple FPGA loop will cause it to PWM instead of stay normally high.

0 Kudos
Message 9 of 12
(266 Views)

Zyong,

 

I don't have that example, I don't have a cRIO folder, is there something specific missing on my software install?

0 Kudos
Message 10 of 12
(264 Views)