LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Palettes like And Gate not working properly in LabVIEW MyRIO FPGA 2014

I generated two Square waves by going to FPGA Math --> Generation --> Square Wave.. Double clicked it Set frequency 4kHz and Selected Boolean in amplitude. Similarly set frequency 50Hz of the other square wave and selected Boolean in amplitude....Now created Indicators at their outputs then took and gate of both the waves and cretaed Result Indicator. But whether you burn it by simulating in FPGA or Run in just simulation mode the Result indicator dosen't gives the result that should come....Moreover result is also not coming right by observing on Oscilloscope by observing Digital Out of the AND gate output.

0 Kudos
Message 1 of 10
(3,357 Views)
By oscilloscope, I assume you mean a real oscilloscope right? What does your code look like? Very little we can say without the code.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 10
(3,336 Views)

There's quite a bit in your post that offers more questions than answers.

 

If I understand correctly, you've created two square waves with frequencies of 4kHz and 50Hz.  From there, you AND (it helps to make these logical operators capitalized for readability) at some rate you haven't shared with us.  You're not seeing the results you expect (which will be hard for us to expect without knowing how often you're ANDing your results).

 

I'm not sure what you mean by "burn it."  I'm going to assume you mean run it.  If you run by simulating in FPGA or in "just simulation mode" you're doing the same thing.  What did you mean to be the second option here?  Simulation mode runs the FPGA in simulation.  If it weren't for the need to simulate the FPGA, we'd just call this running your code as it'd be pretty silly to simulate the host behavior on the host.

 

What O-Scope are you using?  You're running in simulation mode.  There won't be any outputs to read.  It's not surprising your external device isn't seeing any outputs while you're running a simulation.  It never will. You shouldn't be expecting a result here.

 

Are you able to share the code?  Are you able to tell us how frequently you're ANDing your two signals? What results are you currently seeing? 

0 Kudos
Message 3 of 10
(3,327 Views)

Yup the Real Oscilloscope.... Actually I had to generate pulses for a three phase inverter.. For which I had to take AND gate of the 4kHz wave with three 50Hz square waves displaced by 120 degrees and their Not 50Hz waves....Thus producing pulses for the six switches in three phase inverter on DIO pins 11,13,15,17,19,21 and used 12 for ground......But the desired pulses were not coming therefore I looked into the problem and figured out that my AND gate wasn't working properly......That I figured out by observing a simple FPGA program in which I just ANDED a 4kHz wave with 50Hz wave and found after observing the three Indicators associated with 4kHz, 50Hz and their AND.

 

By Burning I meant that the Execution Mode is my FPGA target that is MyRIO-1900....not the Simulation (Simulated IO)....That would give the result on a physical pin of MyRIO and hence obsrveable on Oscilloscope as it did always for me.

 

I have atteched my Desired Code VI Snapshot, the one in which the indicators weren't working properly as well as their VIs.

0 Kudos
Message 4 of 10
(3,320 Views)

These are the VIs of the desired code and the simplified AND of 2 square waves with their indicators.

Download All
0 Kudos
Message 5 of 10
(3,317 Views)

May be the indicators aren't working properly because when 50Hz Indicator is ON the 4kHz indicator should blink fast enough But this is not happening.

0 Kudos
Message 6 of 10
(3,306 Views)

When I Right Click on the output of the Square Wave to Create Indicator then Name it in Block Diagram VI then its Name should be the same in Front Panel VI and should be modified???? This is not happening..I also have to name the indicator in Front Panel VI. It isn't modifying by naming the indicator in Block Diagram VI for the square wave outputs.

0 Kudos
Message 7 of 10
(3,301 Views)

@ubtchughtai wrote:

When I Right Click on the output of the Square Wave to Create Indicator then Name it in Block Diagram VI then its Name should be the same in Front Panel VI and should be modified???? This is not happening..I also have to name the indicator in Front Panel VI. It isn't modifying by naming the indicator in Block Diagram VI for the square wave outputs.


Based on this, I'd want to take a look at your project structure to understand what exactly you're doing.  If you're modifying a terminal on a Block diagram, it should change the control/indicator on the Front Panel.  The terminal is merely a connection between the FP and BD.  Are you looking at the BD for one VI and expecting it to change on the FP of another VI?  After you rename the terminal on the BD, double-click the terminal.  This should take you to the corresponding control/indicator on your FP.  Does it take you to the expected indicator?

0 Kudos
Message 8 of 10
(3,284 Views)

"If you're modifying a terminal on a Block diagram, it should change the control/indicator on the Front Panel."

Does it mean that renaming the indicator in BD should also change the name of the indicator in FP??

 

"Are you looking at the BD for one VI and expecting it to change on the FP of another VI?"

No, the same VI.

 

"After you rename the terminal on the BD, double-click the terminal.  This should take you to the corresponding control/indicator on your FP.  Does it take you to the expected indicator?"

Yes it does.

0 Kudos
Message 9 of 10
(3,277 Views)

ubtchughtai wrote:

"If you're modifying a terminal on a Block diagram, it should change the control/indicator on the Front Panel."

Does it mean that renaming the indicator in BD should also change the name of the indicator in FP??

 

 

Only if you are showing the Label of the Indicator and not the Caption on the Front Panel

 

 

 

0 Kudos
Message 10 of 10
(3,272 Views)