private void open_SF_Click(object sender, EventArgs e)
{
SF = 1;
if (wether_link == 0)
{
MessageBox.Show("请先打开设备!");
return;
}
for (int i = 0; i < axis_all.Length; i = i + 1)
{
LTSMC.smc_write_sevon_pin(CardNum, axis_all[i], 0);//打开伺服使能
}
timer3.Enabled = true;
timer3.Interval = 200;//执行间隔时间,单位为毫秒
timer3.Start();
}
private void close_SF_Click(object sender, EventArgs e)
{
if (wether_link == 0)
{
MessageBox.Show("请先打开设备!");
return;
}
LTSMC.smc_write_outbit(CardNum, 17, 1); //打开抱闸的IO(0,低电平。1,高电平)
timer5.Enabled = true;
timer5.Interval = 200;//执行间隔时间,单位为毫秒
timer5.Start();
}