public async System.Threading.Tasks.Task Start() { await m_jbcConnect.SetContinuousModeAsync(m_stationID, SpeedContinuousMode.T_100mS, Port.NUM_1); m_queueID = System.Convert.ToUInt32(await m_jbcConnect.StartContinuousModeAsync(m_stationID)); //Inicializamos los ticks y empezamos la recogida de datos m_tickCount = 0; m_timerPrintSeries.Start(); }
public async void startStationContinuousMode(SpeedContinuousMode speed = default(SpeedContinuousMode)) { // start new continuous mode queue for all of its ports int count = jbc.GetPortCount((long)ID); int a = (int)Port.NO_PORT; int b = (int)Port.NO_PORT; int c = (int)Port.NO_PORT; int d = (int)Port.NO_PORT; if (count >= 1) { a = (int)Port.NUM_1; } if (count >= 2) { b = (int)Port.NUM_2; } if (count >= 3) { c = (int)Port.NUM_3; } if (count >= 4) { d = (int)Port.NUM_4; } try { await jbc.SetContinuousModeAsync((long)ID, speed, (Port)a, (Port)b, (Port)c, (Port)d); uiContModeQueueID = System.Convert.ToUInt32(await jbc.StartContinuousModeAsync((long)ID)); //Debug.Print("startStationContinuousMode") } catch (Exception ex) { Console.WriteLine("Cstation::startStationContinuousMode . error:" + ex.Message); } }