NI VeriStand Add-Ons Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Engine Simulation Custom Device Feedback

StephenB wrote:

You appear to have edited the AES global variable:

"C:\Program Files (x86)\National Instruments\LabVIEW 2010\user.lib\_NI VeriStand FPGA Support\NI VeriStand RIO Library\Custom Device Components\Engine Simulation\Engine Simulation Globals.vi"

To include a new variable named "Cam2 Tooth Width"

So mine is broken is yours is not. I recommend reverting this change and only using what is installed with the AES library. If you need additional globals or locals, make them yourself without editing the AES VIs

Will do. I should make a habit of that, no more slash-and-burn coding

0 Kudos
Message 51 of 247
(1,700 Views)

BKennedy wrote:

I think I've found it...

Inside N Teeth M Missing is a feedback node whose max range is 512... Something to do with the coersion. Thats when the whole thing flips out!

Will keep you updated!

-Bryan

Ok, so I think I fixed it. Here's how

In "AES N Teeth M Missing Generation.vi":

1) On the 2 adders next to the note "3." => right click->properties->Output Configuration->Word Length = 61; Integer Word Length = 10

2) NTeeth.TDC Offset Control => right click->properties->Output Configuration->Word Length = 61; Integer Word Length = 10

I think this is good

Enjoy!

Bryan

0 Kudos
Message 52 of 247
(1,700 Views)

Found several FXP issues!

The FXP tooth high and low pulse time are calculated in windows/RT code with:

"C:\Program Files (x86)\National Instruments\LabVIEW 2010\user.lib\AES\RT\AES N Teeth M Missing Degrees per Tooth.vi"

Please note the bool input to this VI that adjusts the calculation based upon if you're using the cycle angle or the crank angle.

Since the outputs of this VI and the inputs of the FPGA NTeethMMissing IP block are in FXP configuration of +,58,7... that means the biggest tooth width is 128 degrees. So... this needs to be documented and the custom device updated to prevent an invalid configuration. However... this isn't what is causing your problem.

Also, the TDC offset can only be +/- 64 degrees because of FXP limitations as well. This also isn't your problem, but needs to be documented and custom device updated to prevent an invalid configuration.

Also, the missing teeth offset can only be 0-512 degrees because of FXP limitations. This also isn't your problem, but needs to be documented and custom device updated to prevent an invalid configuration.

And finally, the bug you're seeing is because the feedback node that keeps track of the last transition angle is correctly max range of 1024 degrees... but the addition nodes used to calculate the next transition are set to a max range of 512 degrees. Causing the IP to totally fail if angle ever goes above 512. This will get fixed in the AES library asap!

Stephen B
0 Kudos
Message 53 of 247
(1,700 Views)

Great! Glad everything works. Same conclusion same time

Stephen B
0 Kudos
Message 54 of 247
(1,700 Views)

Excellent! Thanks Steven!

0 Kudos
Message 55 of 247
(1,700 Views)

Hello,

What do you do to change a NI VeriStand FPGA Project into a Custom Device Project? Do you just modify the project the Custom Device Template Tool create, or is there a tool to create a Custom Device Project automatically ?

Thanks for your reply.

Yelingxing

0 Kudos
Message 56 of 247
(1,700 Views)

Hello Stephen,

I am very troubled about the FIFO FullyCustomTeeth.Cams Angles FIFO. For the VeriStand application and the FPGA are synchronized together through the Communication loop. Can we use a FIFO outside the Communication loop? If yes, how can the VeriStand send data to FPGA? As we all know, VeriStand deals with data according to "channels".

Thanks for your reply.

Yelingxing

0 Kudos
Message 57 of 247
(1,700 Views)

Bryan,

I'm glad you changed the FXP configuration on the adders inside the subVI, that will fix the glitching. However, I don't recommend changing the TDC offset FXP type if you're using this bitfile with the NI VeriStand custom device. The NIVS custom device expects this exact FXP configuration so it will not work correctly if you change it. Currently, the custom device does not directly expose TDC offset as a user configurable value... but rather... it calculates the TDC offset by looking at the "TDC Configuration" drop down box. This drop down box has options for TDC being begining of tooth, end of tooth, middle, etc... so the +/- 64 degrees is usually enough unless there is a really small ammount of teeth.

I will be updating AES to fix the glitching when using the Cycle Angle with NTeethMMissing ASAP. However, changing the FXP ranges for the inputs to this NTeethMMissing subVI (like TDC offset & missing teeth offset) will require signficantly more work to maintain compatibility with the custom device and existing bitfiles.... so this might be a while for it to change. So I will update the AES library and Engine Sim custom device to list known issues as:

NTeethMMissing:

  • Largest tooth high or low time can be is 128 degrees
  • TDC offset can not be more than +/- 64 degrees
  • Missing tooth offset can not be more than 512 degrees

In the future we can hopefully resolve these issues, but right now I at least want to document them. It would also be great if I can get the custom device configuration page to throw warnings/errors if the user tries to configure something that exceeds these values.

Stephen B
0 Kudos
Message 58 of 247
(1,700 Views)

Actually, on second thought... I can increase the sizes of the fxp data just fine without worrying about compatibility. So if I did an AES and Custom Device version bump and increased the FXP sizes... users of the old AES library with the new engine sim device would simply gain nothing... where users of the new AES with the new custom device would get more range...

OK ill try to get this update soon.

Stephen B
0 Kudos
Message 59 of 247
(1,700 Views)
0 Kudos
Message 60 of 247
(1,700 Views)