Omron's Fins Command

C

Thread Starter

CC PANG

hey,
i am having a little problem on the omron's fin command. i couldn't specify the start dm address of more than 255 since the byte array can only contain a maximum value of 255.

byte[1] = 0x00;
byte[2] = 0xFF;

i am using byte array to contruct the whole frame in C# and it is a must for the socket to deliver the message. how am i gonna read dm address of 300? it will not work if i put like this,

byte[1] = 0x01;
byte[2] = 0x2C;

it will be intepreted as a value of 144 instead of 300. i cannot use string array because the array must be converted to byte in order to use the socket.

thanks indeed.
 
sounds like fins is expecting address to be stored in hex "nibbles" such that 300 (assuming this is hex 300 (decimal 768) would be

byte[1] = 0x03
byte[2] = 0x00

hence each 4 bit "nibble" contains the corresponding hex digit. So, if your address is decimal 300, hex 12C

byte[1] = 0x01
byte[2] = 0x2C.

Hope this helps

Ed Culpepper
Mid-South Computer Consulting, Inc
[email protected]
 
Top