From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

how to keep PWM express VI working correctly while a customlised FPGA VI is operating

I am working a motor control project which requires at least four PWM signals to control 4 motor based on some control logic. To make the PWM generation easier, 4 PWM express VI on RT target are used to create the desired  PWM signals. Also, a customlised FPGA VI is needed to operate continously while the 4 PWM express VI works. when I combine the PWM express VI and the customlised FPGA VI together, I found that always one VI cannot work correctly.

 

 

In order to illustrate this problem clear, I upload the error_demonstration.rar to help me explan this. If I open the customlised FPGA VI reference and then execute a PWM express VI continously without closing the FPGA VI reference, like what you see in RT_VI_with_FPGA.vi,  the logic of FPGA VI is working as I expected but no PWM signal being generated by the PWM express VI. Also, a error code -61202 is received.

 

If I close the  FPGA VI reference before making PWM express VI working,  like what you see in RT_VI.vi, I will loss the FPGA logic but PWM signal can be detected at the desired pins, which indicates the PWM epress VI works correctly.

 

So my questions is how to  keep PWM express VI working correctly  while a customlised FPGA VI is operating? In other words, what can I do to ensure both express vi and the customlised vi can work together without affecting each other?

0 Kudos
Message 1 of 4
(4,450 Views)

Hello David,

 

In order to use a Custom FPGA with the Express VIs, you will need to modify the myRIO Custom FPGA Project.  This project exposes the FPGA code that allows you to utilize the Express VIs.  For your application, you would want to add your sensor reading logic to the FPGA VI, without modifying one of the connector’s PWM logic.

 

On the other hand, you can implement both the sensor and PWM on the FPGA.  Here is an example to create a PWM output using FPGA.

http://www.ni.com/example/26499/en/

 

In the future, I also recommend posting to one of the following forums instead.  They get more viewship.

http://forums.ni.com/t5/Real-Time-Measurement-and/bd-p/280

http://forums.ni.com/t5/Academic-Hardware-Products-ELVIS/bd-p/10

 

Regards,

Thomas C.
FlexRIO Product Support Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,440 Views)

Hello David,

 

In order to use a Custom FPGA with the Express VIs, you will need to modify the myRIO Custom FPGA Project.  This project exposes the FPGA code that allows you to utilize the Express VIs.  For your application, you would want to add your sensor reading logic to the FPGA VI, without modifying on of the connector’s PWM logic.

 

On the other hand, you can implement both the sensor and PWM on the FPGA.  Here is an example to create a PWM output using FPGA.

http://www.ni.com/example/26499/en/

 

In the future, I also recommend posting to one of the following forums instead.  They get more viewship.

http://forums.ni.com/t5/Real-Time-Measurement-and/bd-p/280

http://forums.ni.com/t5/Academic-Hardware-Products-ELVIS/bd-p/10

 

Regards,

Thomas C.
FlexRIO Product Support Engineer
National Instruments
0 Kudos
Message 3 of 4
(4,440 Views)
Hi, tcap,
Thanks for your suggestions, I will post this on your recommended forums
0 Kudos
Message 4 of 4
(4,425 Views)