1、合并master与2021.1
This commit is contained in:
@@ -8,6 +8,29 @@ namespace ConsoleTestDll
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Test_RS232();
|
||||
}
|
||||
static void Test_RS232()
|
||||
{
|
||||
IntPtr hwnd = (IntPtr)0;
|
||||
Console.WriteLine("init_rs232.");
|
||||
var rStatus = RS232_API.init_rs232(hwnd, 1, 2400);
|
||||
Console.WriteLine("RStatus:{0}", rStatus);
|
||||
Console.WriteLine("Press any key to next step...");
|
||||
Console.ReadLine();
|
||||
byte[] buf = { 3, 1, 13 };
|
||||
Console.WriteLine("Led:Green");
|
||||
RS232_API.Write_Com(buf, 3);
|
||||
Console.WriteLine("Press any key to next step...");
|
||||
Console.ReadLine();
|
||||
buf[1] = 2;
|
||||
Console.WriteLine("Led:Red");
|
||||
RS232_API.Write_Com(buf, 3);
|
||||
Console.WriteLine("Press any key to exit...");
|
||||
Console.ReadLine();
|
||||
}
|
||||
static void Test_MachineInterface()
|
||||
{
|
||||
MACHINEINTERFACEDLL.SSI_STATUS_MOTION rStatus;
|
||||
Console.WriteLine("Machine_Startup.");
|
||||
@@ -24,7 +47,7 @@ namespace ConsoleTestDll
|
||||
Console.WriteLine("IOStatus:");
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
iComp2=iComp1 << i;
|
||||
iComp2 = iComp1 << i;
|
||||
if ((bDISts & iComp2) == iComp2)
|
||||
{
|
||||
IOStatus = true;
|
||||
|
||||
Reference in New Issue
Block a user