Hi,
I am using a CR3000 connected to a S::CAN G series UV spectrometer where I'm trying to control, take measures and return data results in an event based system.
It connects via a propritory S::CAN "Connect" interface which supplies power(12v) and allows connection via USB(laptop) and RS485(logger).
Protocol is Modbus.
I am using a MD485 interface.
For testing I have public floats for all inputs of the modbus command to test returns and run the following.
ModbusMaster(RC,ComSDC7,38400,BusAddress,BusFunction,Variable,RegStartAddress,Length,3,100,Option)
Although I am held by NDA about specfific registry entry names and numbers, I can descibe the problem I am having and how it relates to CRbasic.
I have a problem with data types, or specifically the limited data types of CRbasic; Float,long,Boolean and String.
The device input registers 16bit RO, holding registers RW use various data types
Char[x], string, x bytes
Bitmask, bitmask of 16 units, 2 bytes
Int16, signed 16 bit integer, 2 bytes
Uint16 unsigned 16 bit integer, 2 bytes
Float IEEE754 floating point, 4 bytes
enum, enum type, 2 bytes
timestamp(TAI64N), timestamp, 6 bytes
Because CRbasic has only 4 types, I cannot access, request or switch anything but the Floats contained in the registers.
I specfifically need enum to control switching 0,1 and 0,1,2
which control meausrement, modes such as on/off on/off/auto
I saw a note about firmware OS27(which is what my CR3000 is at) has issues with error codes not reporting, which I think I need, but I need help on creating enum in CRbasic or ways to fool the device that it is a an enum being sent/ retrieved.
thanks
Nigel