private void skinButton1_Click_4(object sender, EventArgs e)
{
if (sevon)
{
open_SF.BaseColor = Color.Green;
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);//打开伺服使能
}
SF = 1;
}
else
{
open_SF.BaseColor = Color.Transparent;
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], 1);//关闭伺服使能
}
SF = 0;
}
sevon = !sevon;
}
伺服使能设计
最新推荐文章于 2022-03-13 17:38:41 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)