02-07-2012 01:03 PM
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
02-07-2012 01:13 PM
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
02-07-2012 01:18 PM
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!
02-07-2012 01:19 PM
Great! Glad everything works. Same conclusion same time
02-07-2012 02:24 PM
Excellent! Thanks Steven!
02-07-2012 11:35 PM
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
02-08-2012 12:04 AM
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
02-08-2012 02:21 PM
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:
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.
02-08-2012 02:40 PM
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.
02-09-2012 03:24 PM
NI VeriStand Add-on: Engine Simulation Custom Device and Automotive Engine Simulation (AES) Library for HIL have been updated