27 lines
785 B
C
27 lines
785 B
C
/*---------------------------------------------------------------------------
|
|
modbus.h
|
|
|
|
Communication routines for Eurotherm ModBus instruments
|
|
|
|
Markus Zolliker, Aug 2005
|
|
----------------------------------------------------------------------------*/
|
|
|
|
#ifndef MODBUS_H
|
|
#define MODBUS_H
|
|
|
|
#include "ease.h"
|
|
|
|
#define MODBUS_BAD_CRC -3090
|
|
|
|
typedef enum {modBusFloat, modBusInt, modBusTime} ModBusType;
|
|
|
|
int ModBusHandler(void *eab);
|
|
void ModBusPutFloats(EaseBase *eab, int adr, int npar, float val[]);
|
|
void ModBusRequestFloats(EaseBase *eab, int adr, int npar);
|
|
float ModBusGetFloat(EaseBase *eab, int adr);
|
|
void ModBusRequestValue(EaseBase *eab, int adr, int type);
|
|
float ModBusGetValue(EaseBase *eab, int type);
|
|
void ModBusPutValue(EaseBase *eab, int adr, int type, float val);
|
|
|
|
#endif
|