using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace Control_CNC_AXBB
{
public partial class Form1 : Form
{
[DllImport("UC100_x86.dll", CallingConvention = CallingConvention.Cdecl)]
unsafe public static extern int ListDevices(ref int DevicesCount);
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
int number = 0;
ListDevices(ref number);
label1.Text = Convert.ToString(number);
}
}
}
'X Left
Private Sub btnJogLeft_Click(sender As Object, e As EventArgs) Handles btnJogLeft.MouseDown
If rbJogCont.Checked Then
UC100.JogOnSpeed(0, True, xvelPCT(nudJogVel.Value))
End If
If rbJogStep.Checked Then
UC100.AddLinearMoveRel(0, nudJogStep.Value, 1, xvelPCT(nudJogVel.Value), True)
End If
End Sub
Private Sub btnJogLeft_Click1(sender As Object, e As EventArgs) Handles btnJogLeft.MouseUp
If rbJogCont.Checked Then
UC100.JogOnSpeed(0, True, 0)
End If
End Sub
'X Right
Private Sub btnJogRight_Click(sender As Object, e As EventArgs) Handles btnJogRight.MouseDown
If rbJogCont.Checked Then
UC100.JogOnSpeed(0, False, xvelPCT(nudJogVel.Value))
End If
If rbJogStep.Checked Then
UC100.AddLinearMoveRel(0, nudJogStep.Value, 1, xvelPCT(nudJogVel.Value), False)
End If
End Sub
Private Sub btnJogRight_Click1(sender As Object, e As EventArgs) Handles btnJogRight.MouseUp
If rbJogCont.Checked Then
UC100.JogOnSpeed(0, False, 0)
End If
End Sub
Return to Ask a question from support here
Users browsing this forum: Bing [Bot] and 23 guests