LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView 2020 FPGA Disable Structure

Solved!
Go to solution

The new LabView 2020 Disable Structure seems to act completely differently from previous Disable Structures that only included Enable and Disable.  Now it includes Compiler constants that refer to Simulation modes, Operating System type, Windows version, etc., ...  However in the projects>Properties section I can set Conditional values, but it seems to have no effect.  

 

I am using an NI Example for FPGA SPI, and critical input and output structures are using a Disable Structure to block real hardware connectivity to the outside world and only use Simulation controls and indicators.  The version I want is the "Default" which contains the real connections to the outside world.  Yet nothing I do seems to effect the Disable Structure and permit me to use the "Default" Value instead.

 

The name of the NI Example is:  "FlexRIO - NI SPI FPGA Simulation"

0 Kudos
Message 1 of 11
(1,741 Views)

Sounds like "Conditional Disable", not "Disable Structure"

0 Kudos
Message 2 of 11
(1,729 Views)

@Edmund130 wrote:

The new LabView 2020 Disable Structure...


The Conditional Diagram Disable Structure has been around since at least 8.2 (oldest version I can verify).

 

As to the rest of your issue, I am not seeing that example.  Was this from a separate install and not just FlexRIO?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 11
(1,724 Views)

This is the FPGA Target Diagram for NI Example:  FlexRIO - NI SPI FPGA Simulation and Real IO - FPGA.vi  However as you can see the FPGA_EXECUTION_MODE == DEV_COMPUTER_SIM_IO only evokes simulation, not real world connectivity.  The Projects>Properties does not seem to permit me to change this Environment constant or control the FPGA_EXECUTION_MODE.

 

2022-07-19  FlexRIO SPI Conditional Structure.jpg

0 Kudos
Message 4 of 11
(1,710 Views)

@Edmund130 wrote:

The Projects>Properties does not seem to permit me to change this Environment constant or control the FPGA_EXECUTION_MODE.


That is a build-time variable.  It is just like when I use the "Runtime_Engine == True" case for my applications.  I cannot run that case in the development environment, but is compiled into the executable.  In this case, the FPGA_EXECUTION_MODE is set to something else when you compile your FPGA.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 11
(1,700 Views)

How do I control the FPGA_EXECUTION_MODE value?  And how can I confirm that the value changed or is invoked?

0 Kudos
Message 6 of 11
(1,696 Views)

How does the FPGA Compiler know I do not want to run in simulation mode?   But real FPGA Target Mode?

 

0 Kudos
Message 7 of 11
(1,695 Views)

Under your project's properties, you'll see this:

billko_0-1658267643938.png

This is where you set the conditionals.  Note that this is set during development and the FPGA gets compiled with those symbols and values.

 

Edit: I saw that you said you looked in the project's properties.  Is this what you said you couldn't change?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 11
(1,674 Views)

No matter what I changed the only enabled feature was the one that I did not want.  Nothing in the Conditional Structure changed int he source code.  all the other options are grayed out.

0 Kudos
Message 9 of 11
(1,635 Views)

@Edmund130 wrote:

How do I control the FPGA_EXECUTION_MODE value?  And how can I confirm that the value changed or is invoked?


See https://www.ni.com/docs/en-US/bundle/labview/page/lvhowto/creating_cond_disable_struc.html

 

The FPGA_EXECUTION_MODE tag is automatically set when you right-click on the FPGA target and select "Select Execution Mode".

 

I recommend against setting this tag in the Target >> Properties page under Conditional Disable Symbols.


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 10 of 11
(1,628 Views)