This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DPLib的使用方法

Other Parts Discussed in Thread: CONTROLSUITE

Step 9 Initialize required macro blocks. Edit the function “DPL_Init” in the above ISR file to
add calls to the initialization code in each macro file. Each call is invoked with a number to identify
the unique instance of that macro block. For example, to create an instance of the 2P2Z control
block with the identifier “1”:
CNTL_2P2Z_INIT 1
Step 10 Edit the assembly ISR to execute the macros in the required order. Edit the function
“DPL_Run” to add calls to the run time routine of each macro and instance being used in the
system. In the example above the first instance of a 2P2Z control macro would be executed by:
CNTL_2P2Z 1

这两步到底是什么意思啊,如何用

controlSUITE\development_kits\TemplateProjects_<ver. No.>\
DPLibTemplate-<device_name> _<ver. No.>修改呢

还有我可不可以重复调用一个函数,例如PWM DRV_1 ch

只是让他从不同的EPWM口输出?

  • CNTL_2P2Z_INIT 1 是初始化参数节点的,有点类似定义2P2Z的参数变量,然后初始化为0. 然后你在主程序中就可以对这些变量重新赋值。

    CNTL_2P2Z 1 就是执行2P2Z算法,类似PID算法。

    可以重复调用同一个函数,但是如PWM DRV_1 1, 则对PWM1驱动,PWM DRV_1 2 对PWM2等。

    详细信息还是要多看DPlib文档。

    C:\ti\controlSUITE\libs\app_libs\digital_power\f2803x_v3.4\Doc

    Eric

  • 谢谢您的解答。

    关于利用sprac85\controlSUITE\development_kits\TemplateProjects\DPLibv3Template-F2802x的工程来快速建立新工程的时候

    是否将函数PWM_1ch_CNF(1,600,1,0);改为PWM_1ch_CNF(2,600,1,0);就应当由ePWM2A出波形啊?为何就是不行呢?。。。

  • 你可以看进去这个函数的源码,看是否配置的是PWM2的。

    还有GPIO2,3你有没配置为PWM功能。

    ERIC

  • 你好,我想问一下,2p2z、3p3z这种应该如何使用?我最近写的一个程序,需要使用4个pid,所以我在原有的2p2z(只能定义两个)基础上,参照2p2z的使用方法,使用了3p3z,但是发现3p3z控制器并没有工作,只是按照最小占空比输出。