工业交流点焊机的缓升电流控制
2014-11-19 16:01
399 查看
/**************************************************
/*
功能: 工业交流点焊机的缓升电流控制-程序实现(C51)
注意:此函数要根据你的应用做少量改动
定义:
bSynClock 同步触发信号由中断提供
*/
BCD_Buf[1]:缓升设置,0-99
BCD_Buf[6]: 焊接1电流值,0-99
sbit WORK_LED = P1^3;
sbit W1_LED = P1^4;
sbit ALARM_LED
= P1^5;
sbit W2_LED = P1^6;
sbit RUN_LED
= P1^7;
sbit TR_INT0 = P3^2;
sbit T_SW = P3^3;
sbit Weld_Out = P3^5;
sbit Gas_Out = P3^6;
*/
void SlowRise(void)
{
BCD_Buf[1] = BCD_Buf[1]*2;// 缓升
StepRise = BCD_Buf[6]/BCD_Buf[1];// current divide SlowRise
StepRise++;
WeldPoint = 0;
while(1)
{
if(BCD_Buf[1] == 0 || BCD_Buf[6] == 0)
break;
if(Start_SW)// if FootSW OFF,then Exit
{
TR0 = 0;
Weld_Out = 1;
W1_LED = 1;
RUN_LED = 1;
break;
}
RUN_LED = 0;
W1_LED = 0;
WeldPoint += StepRise;
Result = WeldData[WeldPoint];// get weld_data from table
do{
}while(!bSynClock);// wait synchronization signal
bSynClock = 0;// reset
if(WeldPoint < BCD_Buf[6])// if less-than current,then continue run "SlowRise"
{
TH0 = (uchar)(Result>>8);
TL0 = (uchar)Result;
TR0 = 1;
ET0 = 1;
}
else
{
TR0 = 0;
ET0 = 0;
Weld_Out = 1;
break;
}
}
}
/*
功能: 工业交流点焊机的缓升电流控制-程序实现(C51)
注意:此函数要根据你的应用做少量改动
定义:
bSynClock 同步触发信号由中断提供
*/
BCD_Buf[1]:缓升设置,0-99
BCD_Buf[6]: 焊接1电流值,0-99
sbit WORK_LED = P1^3;
sbit W1_LED = P1^4;
sbit ALARM_LED
= P1^5;
sbit W2_LED = P1^6;
sbit RUN_LED
= P1^7;
sbit TR_INT0 = P3^2;
sbit T_SW = P3^3;
sbit Weld_Out = P3^5;
sbit Gas_Out = P3^6;
*/
void SlowRise(void)
{
BCD_Buf[1] = BCD_Buf[1]*2;// 缓升
StepRise = BCD_Buf[6]/BCD_Buf[1];// current divide SlowRise
StepRise++;
WeldPoint = 0;
while(1)
{
if(BCD_Buf[1] == 0 || BCD_Buf[6] == 0)
break;
if(Start_SW)// if FootSW OFF,then Exit
{
TR0 = 0;
Weld_Out = 1;
W1_LED = 1;
RUN_LED = 1;
break;
}
RUN_LED = 0;
W1_LED = 0;
WeldPoint += StepRise;
Result = WeldData[WeldPoint];// get weld_data from table
do{
}while(!bSynClock);// wait synchronization signal
bSynClock = 0;// reset
if(WeldPoint < BCD_Buf[6])// if less-than current,then continue run "SlowRise"
{
TH0 = (uchar)(Result>>8);
TL0 = (uchar)Result;
TR0 = 1;
ET0 = 1;
}
else
{
TR0 = 0;
ET0 = 0;
Weld_Out = 1;
break;
}
}
}
相关文章推荐
- 工业平缝机主轴PMSM无电流传感器控制
- 嵌入式系统在工业控制中的应用
- 工业控制信息安全资源汇总
- 工业控制,实时监控,远程管理,数据采集,控件,VC++源代码组件库解决方案
- stm32所有I/O和控制引脚的电流能力
- 应用VB4.0实现工业控制的实时曲线…
- ARM工控板,三星S5P4418工业控制核心板。
- 如何将能量收集应用于高可靠性工业控制环境
- C#与工业控制-串口中
- Linux内核的动态电压和电流控制接口(regulator)
- 用VC实现多串口多线程工业控制
- 工业控制计算机
- 工业控制应用面临的几个关键问题
- 嵌入式Linux技术在工业数据采集及工业控制中的应用
- 工业控制/仿真集成开发平台设计与VC++源代码解决方案
- Multisim14使用 电流控制的电流源 简单示例
- 为什么工业上用4到20毫安电流传输数据
- 工业控制信息安全标准介绍
- AVR+FPGA实现六路闭环电流控制程序
- 工业控制领域的新标准:opc