LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running Statechart on FPGA

Solved!
Go to solution

Hi,

 

   I'm trying to use the Statechart Module with the FPGA Module, and after analyzing my problem, it looks like i'd want to run the statechart on  the FPGA in asynchronous mode.  That is, the FPGA has several operational states (one aquisition loop, 2 concurrent control loop regions - each with substates), and I'd like the FPGA vi to transition between the states based on front panel triggers from my Host vi.

 

   So I figured I could run the statechart in asynch mode on the FPGA, and send it external triggers and data from the Host vi in reaction to my front panel input.  The thing is, I can't run the statechart in asynchronous mode on the  FPGA.

 

  Each of the substates on the FPGA should run indefinitely, until instructed to change from the host vi - eg. control states, measurement states, idle states

 

   

   So what's another, recommended way to go about accomplishing this?

 

Thanks

 

 

NI Hardware: PXI-7853R, PCI-5122, PCI-6733, PXI-1036, PCI-MIO-16E-4, PCI-6110
Computer Hardware: Xeon Quad Core - 2.33 Ghz, 8 GB RAM
Software: Labview 2009, Labview FPGA 2009, Vista 64-bit, MAX 4.6, DAQmx 9.0, NI-SCOPE 3.5
0 Kudos
Message 1 of 3
(1,539 Views)
Solution
Accepted by topic author noli
One common strategy is to send a NULL (default) trigger when there is no change to be made. This trigger acts as a sort of heartbeat, causing the statechart to continue running. Then you can send a specific trigger when you want the statechart to change states, etc.
Message 2 of 3
(1,497 Views)

Ok, that seems like a better strategy than what I ended up trying..  I ended up describing each of my states by multiple or groups of triggers, and sending the relevant trigger at all times, and only transitioning when the triggers changed.  And then I would run the static action from the trigger for that state.  But its starting to get complicated using this method, so I'll give yours a shot.

 

Thanks!

NI Hardware: PXI-7853R, PCI-5122, PCI-6733, PXI-1036, PCI-MIO-16E-4, PCI-6110
Computer Hardware: Xeon Quad Core - 2.33 Ghz, 8 GB RAM
Software: Labview 2009, Labview FPGA 2009, Vista 64-bit, MAX 4.6, DAQmx 9.0, NI-SCOPE 3.5
0 Kudos
Message 3 of 3
(1,493 Views)