第一范文网 - 专业文章范例文档资料分享平台

系统集成说明书

来源:用户分享 时间:2025/5/24 20:31:16 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

ofv = (float)(dm1-dp1)/1024.0*3.23*7.790+17.96; lcd_ofv=ofv; lcd_ofc=ofc; }

float voltage_pid(float voltage) {

uint8 index;

pid.ActualVoltage = ofv; pid.SetVoltage=voltage;

pid.err=pid.SetVoltage-pid.ActualVoltage; float

incrementVoltage=pid.Kp*(pid.err-pid.err_next)+pid.Ki*pid.err+pid.Kd*(pid.err-2*pid.err_next+pid.err_last);

pid.Voltage+=incrementVoltage; pid.err_last=pid.err_next; pid.err_next=pid.err; return pid.Voltage; }

void date_execute() {

int16 tmp=0;

date_get(); date_analyse();

tmp =(int16) voltage_pid(new_val); if(tmp>550) tmp=550; if(tmp<50) tmp=50; out_put=tmp; }

2、主程序

#include \#include \extern float new_val; extern vint16 out_put;

extern float lcd_set,lcd_out; extern vint16 tt;

extern volatile float lcd_ofv,lcd_ofc;

void vcan_sendware(uint8 *wareaddr, uint32 waresize); extern uint8 var[2];

void main()

13

{

source_init(); while(1) {

deal_key_event();

DisplayFloat8x16(lcd_set,40,0); DisplayFloat8x16(lcd_out,40,2); DisplayFloat8x16(lcd_ofv,80,4); DisplayFloat8x16(lcd_ofc,80,6);

ftm_pwm_duty(FTM0,FTM_CH0,100); //vcan_sendware((uint8_t *)var, sizeof(var)); }

}

14

15

搜索更多关于: 系统集成说明书 的文档
系统集成说明书.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c1plhg4c8c541z4g1sgcd5uqa87qzsz016s5_4.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top