LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID (FPGA) not supported in an FPGA Statechart?

Solved!
Go to solution

I'm trying to test a PID (FPGA) vi  in a statechart built to run on the FPGA, but its giving me the following error.  Am I missing something, or does the PID (FPGA) really not work when you use it in an FPGA statechart?

 

Thanks

 

pidsc.png

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 7
(3,138 Views)
It appears (from your error list window) that you have your FPGA statechart under two different targets, "FPGA (Dev Computer)" and "My Computer". LV should be performing this error-checking based on the target you are under, so my guess is this error is being reported in the "My Computer" target, just as it would be if you had a regular VI under "My Computer" and dropped PID (FPGA) there. If you only have FPGA States.lvsc under the FPGA target, do you still get the error?
0 Kudos
Message 2 of 7
(3,134 Views)

I'm not sure I understand your question correctly, but i'll tell you what I tried.

 

So I placed the statechart under the FPGA resource in the LV Project, and set it to execute on the FPGA.  When I edit the statechart, in the lower left bar it tells me that its set to run under FPGA (Dev Computer), and everything works when I remove the FPGA.  When I accidently tried to wire a double as an input to the statechart, it setna  warning saying that the double type wasn't allowed for this target (which is good for an FPGA target), so I think its considering the statechart to be run under the FPGA.   The Server:localhost message that we see on the bottom left only comes up when I open a statechart action to edit, but when I close it, it returns to displaying the FPGA (Dev computer)

 

 

I also tried copying the statechart directly to my Host vi to see if the PID(FPGA) would give the same error there, but it actually seems to work fine on a host VI.. so..  I'm a bit lost.

 

There are some other weird things i'm noticing using the statechart on an FPGA which seem like they might be bugs (such as when I try to build an array in a statechart action it errors saying that the arrays need to be of fixed sized.  On an FPGA vi you typically have the option to preallocate the array size, but in the statechart, I don't see any similar option), but i'll post about that seperately.

 

So I don't know if I answered your question..  and I'm still lost =P

 

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 7
(3,130 Views)

That is odd... I'm looking into it (I didn't have a machine handy with the PID stuff installed so I'm having to get that set up in the background).

 

As for the preallocated array size, etc, there is actually a setting in the properties tab of the configuration dialog that will let you turn this on. There is a known issue though where this sometimes will not take effect - to ensure it does make sure you modify your guard and action before hitting OK on the configuration dialog (any modification, such as a cosmetic/movement operation, will do the trick).

 

I'll let you know what I see with PID once I get set up.

0 Kudos
Message 4 of 7
(3,121 Views)
Solution
Accepted by topic author noli

Ok, so it turns out this is a confusing error message/situation. It actually is tied to the autopreallocate setting. If you drop PID (FPGA) on a regular VI in an FPGA target and disable autopreallocation, the VI will break with the same error message.

 

So to use PID in your statechart guard/action, go to the properties tab in the configuration dialog, check the autopreallocate option, and drop PID. LV will still show the error because we don't change the autopreallocate setting until you hit OK. If you open up the configuration dialog again, the "not supported on Target" error should be gone.

 

Hope this helps.

 

- Nick

 

Message 5 of 7
(3,111 Views)

Ah-hahh...   So it looks like that fixes both problems.   That was extremely tricky, subtle, and not at all intuitive.   Good find!  It took me a while to click and close the diagrams correctly for all the releevant states and superstates, but now it works.  Hopefully we'll see NI correct or clarify this behavior though for future versions.

 

Thanks alot Nick!

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 6 of 7
(3,106 Views)
Glad to help. I agree it is not a very user-friendly or intuitive experience. I'll file some bug reports on the various issues so hopefully we can see some of this addressed in a later release. Thanks much for letting us know about the problems.
0 Kudos
Message 7 of 7
(3,101 Views)