 |
Lydia - Printhead
|
Go to the documentation of this file.
8 #include <ModbusValue.h>
9 #include <xstatistics.h>
22 #define E_VFD_MB_QUEUE_STATUS 1
23 #define E_VFD_MB_QUEUE_DIR 2
24 #define E_VFD_MB_QUEUE_AMPS 3
25 #define E_VFD_MB_QUEUE_CMD 4
26 #define E_VFD_MB_QUEUE_LENGTH 1
74 ShiftRegister<uchar, E_VFD_MB_QUEUE_LENGTH>
queue;
78 Log.verboseln(
"FC:%d | State:%d | Status:%d",
FC,
state,
status);
83 class OmronVFD :
public Component,
public ModbusValue<int[]>
131 Component *_owner) : ModbusValue<int[]>(
MB_W_VFD_RUN, MB_FC::MB_FC_READ_REGISTERS),
140 SBI(nFlags, OBJECT_NET_CAPS::E_NCAPS_MODBUS);
143 runMode = E_VFD_RUN_MODE::E_VFD_RUN_MODE_NONE;
145 direction = E_VFD_DIR::E_VFD_DIR_FORWARD;
146 setNumberAddresses(4);
147 setFunctionCode(MB_FC::MB_FC_READ_REGISTERS);
148 setRegisterMode(MB_REGISTER_MODE::E_MB_REGISTER_MODE_READ);
162 short read_16(
int addr,
int num,
int prio = 0);
165 uint16_t
write_Bit(uint16_t addr,
int on);
170 bool skipRead(
int slave,
int fn,
int addr,
int num,
int prio);
uint16_t write_Single(uint16_t cmd, unsigned int data)
#define E_VFD_MB_QUEUE_STATUS
@ E_VFD_RUN_MODE_STOP_RETRACT
bool skipRead(int slave, int fn, int addr, int num, int prio)
E_VFD_RETRACT_STATE retractState
short onRawResponse(short size, uint8_t rxBuffer[])
@ E_VFD_STATE_ACCELERATING
uint16_t lastWriteAddress
@ E_VFD_RETRACT_STATE_BRAKE_REVERSING
short readSingle_16(int addr, int prio=0)
uint16_t read_coil_single(uint16_t addr)
#define OMRON_MX2_STATE_INTERVAL
@ E_VFD_RETRACT_STATE_STOPPED
OmronVFDState * getVFDState()
uint16_t setTargetFreq(uint16_t freq)
OmronVFD(ModbusBridge *_bridge, short _slaveId, Component *_owner)
@ E_VFD_STATE_DECELERATING
short read_16(int addr, int num, int prio=0)
@ E_VFD_RETRACT_STATE_RETRACTED
ShiftRegister< uchar, E_VFD_MB_QUEUE_LENGTH > queue
short onError(short error)
@ E_VFD_RETRACT_STATE_BRAKING
short onRegisterMethods(Bridge *bridge)
@ E_VFD_RETRACT_STATE_NONE
uint16_t write_Bit(uint16_t addr, int on)
short onResponse(short error)
@ E_VFD_RETRACT_STATE_REVERSING