by Mindustrys » Fri Jul 21, 2023 8:06 am
attualmente ho scritto questo codice, ma non funziona
using System;
using System.Threading;
class Program
{
static void Main()
{
Thread thread1 = new Thread(Loop1);
Thread thread2 = new Thread(Loop2);
thread1.Start();
thread2.Start();
}
static void Loop1()
{
int port = 1;
int pin = 3;
while (true)
{
exec.Setoutpin(port, pin); // Accendi l'output 1
Thread.Sleep(1000); // Attendere 1 secondo
exec.Clroutpin(port, pin); // Spegni l'output 1
Thread.Sleep(1000); // Attendere 1 secondo
}
}
static void Loop2()
{
while (true)
{
exec.Code("G1A360");
exec.AddStatusmessage("finish");
}
}
}