This demonstrates the process of communicating through ethernet to a SEL-2431 Voltage Regulator Control Panel using SEL Fast Message. Basic device commands and data cna be requested and displayed over a connected serial port. This is a basic version and full testing and documentation has yet to be completed.
Dependencies: BufferedSerial analogAverager voltageRegulator netStatReg analogMinMax CounterMinMax
selMsg.h
- Committer:
- masterkookus
- Date:
- 2019-10-07
- Revision:
- 12:4bb088c27838
- Parent:
- 11:d40adc7de05f
- Child:
- 15:9ad261a27883
File content as of revision 12:4bb088c27838:
#ifndef SELMSG_H #define SELMSG_H const char fmCmd[5][2] = { {0xA5,0xC0}, {0xA5,0xC1}, {0xA5,0xD1}, {0xA5,0xC2}, {0xA5,0xD2} }; const char serCmd[5][7] = { {'M','E','T',' ','M','\r','\n'}, {'T','A','P','\r','\n',' ',' '}, {'A','C','C','\r','\n',' ',' '}, {'O','T','T','E','R','\r','\n'}, {'\r','\n',' ',' ',' ',' ',' '} }; const char serCmdSeq[2][5] = { {0x02,0x03,0x04,0x04,0x00}, {0x02,0x03,0x04,0x04,0x01} }; const char serCmdlen[2][5] = { {0x05,0x07,0x04,0x04,0x07}, {0x05,0x07,0x04,0x04,0x05} }; const char vRegDevCfg[23] = { 0xA5,0xC0,0x17,0x02,0x03,0x00,0xA5,0xC1,0xA5,0xD1,0xA5,0xC2,0xA5,0xD2,0xA5,0xC3,0xA5,0xD3,0x01,0x00,0x00,0x05,0x21 }; struct analog1Sample { char analogName[6]; float analog1Value; }; struct analog2Sample { char analogName[6]; float analog1Value; float analog2Value; }; struct analog3Sample { char analogName[6]; float analog1Value; float analog2Value; float analog3Value; }; struct analog4Sample { char analogName[6]; float analog1Value; float analog2Value; float analog3Value; float analog4Value; }; struct fmTimeStamp { char month; char day; char year; char hour; char min; char sec; short msec; }; struct vRegData { char numAnalog; char numDigital; char numDemAnalog; struct analog1Sample analogs[27]; struct analog1Sample calculated[5]; struct fmTimeStamp timeStamp; struct fmTimeStamp demTimeStamp; char digitalTargets[52]; }; void initVoltageRegulator(vRegData *vReg); #endif