Пример #1
0
        public static void Start(SpindleDirection direction)
        {
            //    ModBus packet format [xx] = one byte i.e. 0x1E
            //
            //      [xx]   |     [xx]     |      [xx]      | [xx] [xx] [..] | [xx][xx]
            //    Slave ID | Command Type | Request Length |     Request    |   CRC
            //
            //    The casting of Enum's below is way overkill but it's to help anyone trying
            //    to get their head around the format of the 'ModBus' protocol used by these
            //    spindles. The CRC is added as part of the SendData() method.
            //

            Serial.SendData(ReadCurrentSetF); // I'm not sure why this is needed but it seems to be
            SetFrequency(Settings.VFD_MinFreq);

            // For future testing, the spindle reverse function doesn't appear to be working
            Serial.SendData(direction == SpindleDirection.Forward ? RunForward : RunBack);
        }
Пример #2
0
        public static void Start(SpindleDirection direction)
        {
            //    ModBus packet format [xx] = one byte i.e. 0x1E
            //
            //      [xx]   |     [xx]     |      [xx]      | [xx] [xx] [..] | [xx][xx]
            //    Slave ID | Command Type | Request Length |     Request    |   CRC
            //
            //    The casting of Enum's below is way overkill but it's to help anyone trying
            //    to get their head around the format of the 'ModBus' protocol used by these
            //    spindles. The CRC is added as part of the SendData() method.
            //

            Serial.SendData(ReadCurrentSetF); // I'm not sure why this is needed but it seems to be
            SetFrequency(Settings.VFD_MinFreq);

            // For future testing, the spindle reverse function doesn't appear to be working
            Serial.SendData(direction == SpindleDirection.Forward ? RunForward : RunBack);
        }