01-04-2012 03:20 PM
Devin,
I wanted to change the type of encoder pattern to be something other than what is currently possible in the Engine Simulation Device. I have attached an image of the encoder pattern I wish to use. It is a GM pattern that is used on some of their engines. Where / how would be the best way to modify the model to make this sort of pattern possible?
Regards,
Robert
01-04-2012 05:15 PM
Hi Robert,
Engine Simulation FPGA personalities can have two different type of teeth profiles:
1) N-Teeth M-Missing
2) Fully Custom
Usually "N-Teeth M-Missing" profiles are used to generate crank signals and "Fully Custom" profiles are used to generate cam signals, but this doesn't have to be the case. In your case, you would want to drop a "Fully Custom" loop and give the indicators an appropriate component name (ex. "Cranks" or "Encoders" instead of "Cams"). Also since this signal goes between 0-360 degrees and not 0-720 degrees, make sure to wire up "Crank Angle" as the angle input instead of "Cycle Angle".
When you add this bitfile to the Engine Simulation Custom Device, you will see a section with the component name you used. You can then set this up to have 24 teeth, then define the rise/fall angles of the teeth. In your case, this would be:
Tooth 1: 5 rising, 15 falling
Tooth 2: 20 rising, 30 falling
Tooth 3: 35 rising, 45 falling
...
Tooth 24: 350 rising, 360 falling
(Unfortunately it may take a bit of time to manually enter all 24 teeth, since there is currently no angle import function)
I think the picture of the wheel on the Fully Custom page is fixed to draw from 0-720 degrees, so the image will probably be incorrect (only showing teeth on the first half of the wheel). However, this is only for visualization purposes only, and shouldn't affect the actual functionality of the code when it's running. Just make sure to use the "Crank Angle" instead of the "Cycle Angle" as mentioned above, and the signal should be generated correctly.
Regards,
Devin
01-05-2012 01:40 PM
Thank you Devin,
When I added "Fully Custom" loop to an already created engine simulation bitfile I also created a new FIFO to go along with it. When I tried to compile the file file I got an error during the "generate intermediate files process" the error states (image of error attached):
-------------------------------
The Current target does not have suffiecient DMA control line sets aviable.
Too many sets of DMA control lines have been requested or some requests are conflicting. The current target has 3 sets of DMA control lines. Review the list of requestors and remove one or more requestors to free up resources.
------------------------------
I wanted to keep the origional cam generation loop and I am trying to use the new "fully custom" loop to replace the existing crank loop so I can generate the crank encoder I showed you above / as you described.
Any suggestions?
Thanks very much for the help!
01-05-2012 01:49 PM
Hi Robert,
Yes, most of our FPGA targets have a maximum of 3 DMA FIFOs available, which often becomes a problem because the default NI VeriStand communication uses up 2 of them. Because of this limitation, I recently modified the custom device and AES library so that the Fully Custom loop no longer uses a DMA FIFO to communicate the angles.
Download the updated versions of the custom device and library, and re-read the pages below for updated instructions for the Fully Custom loop.
01-05-2012 01:53 PM
I should also mention that the custom device can still handle DMA FIFO communication for the Fully Custom loop, so your old bitfiles will still work.
01-19-2012 10:54 AM
Hey Devin,
Any plans to add an "import angle profile" file so that we don't have to type in all of the tooth positions (typing in 164 entries for 82 teeth = yuck!) for a fully custom profile?
Thanks,
Ross Dunkel
Ball Systems
Devin_K wrote:
Hi Robert,
Engine Simulation FPGA personalities can have two different type of teeth profiles:
1) N-Teeth M-Missing
2) Fully Custom
Usually "N-Teeth M-Missing" profiles are used to generate crank signals and "Fully Custom" profiles are used to generate cam signals, but this doesn't have to be the case. In your case, you would want to drop a "Fully Custom" loop and give the indicators an appropriate component name (ex. "Cranks" or "Encoders" instead of "Cams"). Also since this signal goes between 0-360 degrees and not 0-720 degrees, make sure to wire up "Crank Angle" as the angle input instead of "Cycle Angle".
When you add this bitfile to the Engine Simulation Custom Device, you will see a section with the component name you used. You can then set this up to have 24 teeth, then define the rise/fall angles of the teeth. In your case, this would be:
Tooth 1: 5 rising, 15 falling
Tooth 2: 20 rising, 30 falling
Tooth 3: 35 rising, 45 falling
...
Tooth 24: 350 rising, 360 falling
(Unfortunately it may take a bit of time to manually enter all 24 teeth, since there is currently no angle import function)
I think the picture of the wheel on the Fully Custom page is fixed to draw from 0-720 degrees, so the image will probably be incorrect (only showing teeth on the first half of the wheel). However, this is only for visualization purposes only, and shouldn't affect the actual functionality of the code when it's running. Just make sure to use the "Crank Angle" instead of the "Cycle Angle" as mentioned above, and the signal should be generated correctly.
Regards,
Devin
01-19-2012 02:43 PM
Hi Ross,
Yeah, I agree, we should really have some sort of import function...
I'm thinking a tab-delimited file (rising angle <tab> falling angle) that gets input on each "Fully Custom" page. You would still need to define the number of teeth in the parent section, and if the number of angles in the imported file doesn't match up, it would need to be fixed (either zero-pad or truncate the imported array).
I'm not sure when I'll have a chance to add this though. How urgently do you need this?
Regards,
Devin
01-23-2012 01:55 PM
Devin,
I'm having issues getting the IC inputs to work properly. I have them connected to the IC outputs on my engine controller but the device isn't showing any values for the IC's in veristand with the project running. I did walk through the steps and started by using the NI Veristand FPGA project wizzard. The IC channels were by defalut hooked up to PWM channels. When I try modifying the file so that the IC channels anren't hooked up to the PWM logic, I can build the model, but when I deploy it using veristand, the CPU locks at 100% for a while and Veristand looses connection. Any ideas why this may be hapening? I did delete the channels out of the XML config file.
Regards,
Robert
01-23-2012 02:41 PM
Hi Guys!
I have may have bumped into an issuehaving to do with custom FPGA code.
The application we are developing for calls for simulating a Crank and 2 Cam outputs. The reason we are generating custom FPGA code is that the customer wants to use the "N Teeth M Missing" profile generation algorithm for all 3 signals. We were happily suprised to see that the Engine Sim CD can already do this, and it was just a matter of plopping down the correct template loops and renaming the controls to get the CD to recognize this! So I have replaced the Fully Custom Loop with 2 "N Teeth M Missing" loops and renamed the controls from NTeeth.Crank.* to NTeeth.Cam1.* and NTeeth.Cam2.*. Easy!
The FPGA compiles beautifully, however, when we import the bitfile into the CD, only the Crank and Cam1 Sections appear, Cam2 is left out! I was wondering if you all could provide some insight into the problem.
I have attached the FPGA.vi and compiled bitfile to assist.
Thanks!
Bryan
01-23-2012 03:39 PM
FYI
A new version of the AES library (2.3) has been posted Automotive Engine Simulation (AES) Library for HIL
A new version of the Custom Device (3.2) has been posted NI VeriStand Add-on: Engine Simulation Custom Device