Esempio n. 1
0
        /// <summary>
        /// Async method from controller, MID 0061 (Last Tightening)
        /// Basically, on every tightening this method will be called!
        /// </summary>
        /// <param name="e"></param>
        private void OnTighteningReceived(MIDIncome e)
        {
            driver.SendMessage(e.Mid.BuildAckPackage());

            var tighteningMid = e.Mid as Mid0061;

            lastMessageArrived.Text = Mid0061.MID.ToString();
            Console.WriteLine($@"TIGHTENING RECEIVED (MID 0061): 
                                 Cell ID: <{tighteningMid.CellId}>
                                 Channel ID: <{tighteningMid.ChannelId}>
                                 Torque Controller Name: <{tighteningMid.TorqueControllerName}>
                                 VIN Number: <{tighteningMid.VinNumber}>
                                 Job ID: <{tighteningMid.JobId}>
                                 Parameter Set ID: <{tighteningMid.ParameterSetId}>
                                 Batch Size: <{tighteningMid.BatchSize}>
                                 Batch Counter: <{tighteningMid.BatchCounter}>
                                 Tightening Status: <{tighteningMid.TighteningStatus}>
                                 Torque Status: <{(int)tighteningMid.TorqueStatus}> ({tighteningMid.TorqueStatus.ToString()})
                                 Angle Status: <{(int)tighteningMid.AngleStatus}> ({tighteningMid.AngleStatus.ToString()})
                                 Torque Min Limit: <{tighteningMid.TorqueMinLimit}>
                                 Torque Max Limit: <{tighteningMid.TorqueMaxLimit}>
                                 Torque Final Target: <{tighteningMid.TorqueFinalTarget}>
                                 Torque: <{tighteningMid.Torque}>
                                 Angle Min Limit: <{tighteningMid.AngleMinLimit}>
                                 Angle Max Limit: <{tighteningMid.AngleMaxLimit}>
                                 Final Angle Target: <{tighteningMid.AngleFinalTarget}>
                                 Angle: <{tighteningMid.Angle}>
                                 TimeStamp: <{tighteningMid.Timestamp.ToString("yyyy-MM-dd:HH:mm:ss")}>
                                 Last Change In Parameter Set: <{tighteningMid.LastChangeInParameterSet.ToString("yyyy-MM-dd:HH:mm:ss")}>
                                 Batch Status: <{(int)tighteningMid.BatchStatus}> ({tighteningMid.BatchStatus.ToString()})
                                 TighteningID: <{tighteningMid.TighteningId}>");
        }
Esempio n. 2
0
        /// <summary>
        /// Async method from controller, MID 0035 (Job Info)
        /// </summary>
        /// <param name="e"></param>
        private void OnJobInfoReceived(MIDIncome e)
        {
            driver.SendMessage(e.Mid.BuildAckPackage());

            var jobInfo = e.Mid as Mid0035;

            lastMessageArrived.Text = Mid0035.MID.ToString();
            Console.WriteLine($@"JOB INFO RECEIVED (MID 0035):
                                 Job ID: <{jobInfo.JobId}>
                                 Job Status: <{(int)jobInfo.JobStatus}> ({jobInfo.JobStatus.ToString()})
                                 Job Batch Mode: <{(int)jobInfo.JobBatchMode}> ({jobInfo.JobBatchMode.ToString()})
                                 Job Batch Size: <{jobInfo.JobBatchSize}>
                                 Job Batch Counter: <{jobInfo.JobBatchCounter}>
                                 TimeStamp: <{jobInfo.TimeStamp.ToString("yyyy-MM-dd:HH:mm:ss")}>");
        }