Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Stewart

Pages: [1]
1
Support Questions / Re: Modbus Float point byte and word swap
« on: May 01, 2015, 02:10:59 PM »
Archie,
Thanks again for the quick response & update.

As before i will test it out and give you my feedback.

Stewart

2
Support Questions / Re: Modbus Float point byte and word swap
« on: April 28, 2015, 07:19:06 AM »
Archie,
I did some testing over the weekend of the latest release (V398f) using Modbus RTU.  I’m still having problems with getting the right output values using ‘Basic label’.

The results are below.

Device used for testing is a Modbus RTU Energy Meter using RS485.
Value being read from the device is a Float of 4 bytes which should display 60.02
Using standard Modbus software the raw output when reading address 400XX is:

RX: 0x01 0x04 0x04 0x42 0x70 0x14 0x7B 0xAA 0xBB

When this value is read using Advanced HMI the following value is displayed:

SwapBytes = False
2.990863E+30

SwapBytes = True
7.819442E-25

Digging deeper to see why I was getting the values above, I setup a Modbus RTU simulator software to see if I could make Advanced HMI output the values above.
To get the values listed below to be displayed using a ‘Basic label’ in Advanced HMI required the following raw string to be sent to it:

Display = 60.02
TX: 0x01 0x03 0x04 0x14 0x7B 0x42 0x70 0xAA 0xBB

Display = 2.990863E+30
TX: 0x01 0x03 0x04 0x00 0x01 0x72 0x17 0xAA 0xBB

Display = 7.819442E-25
TX: 0x01 0x03 0x04 0x00 0x01 0x17 0x72 0xAA 0xBB

In analyzing the results it seems that advanced HMI is doing the following:
1.   It takes the raw bytes received from device and does a word swap: 42 70 14 7B => 14 7B 42 70
2.   It then converts it to 6002
3.   Next it converts the 6002 => 17 72
4.   Depending on if SwapBytes is True or False it swaps the bytes and outputs that as the value to display.

After all that my question is, can I get Advanced HMI to not do the 2nd conversion to 17 72 and just output the 6002 value?
Also to read some of the other addresses for this device is it possible to have a SwapWord property?

Thanks in advance, your software and support is awesome.
Stewart


3
Support Questions / Re: Modbus Float point byte and word swap
« on: April 13, 2015, 12:06:12 PM »
Archie,
Thanks a lot.

I will test it out whenever you release the new update and give you feedback.

Stewart

4
Support Questions / Re: Modbus Float point byte and word swap
« on: April 12, 2015, 04:49:02 PM »
Archie,
Thanks for the quick response.

When i checked for 16 bit integer values i get the following:

Advanced HMI at 40xxx i get a value of 257, when i use “ShortBus Modbus Scanner” i get the same 257
Advanced HMI at 40yyy i get a value of -27136, when i use “ShortBus Modbus Scanner” i  get 9600

I guess the -27136 value is padded with FFFFFFFFFFFF

Is is possible to add a feature like 'FW' = Float word swap and 'FB' = Float byte swap, 'FBW' = Float byte word swap
or some thing like that?

Thanks
Stewart

5
Support Questions / Modbus Float point byte and word swap
« on: April 12, 2015, 01:23:14 PM »
Hi,
I have a Modbus device that I have been able to get working but the value I’m getting is wrong. It’s a float value but it needs to be “byte and word swapped”. When i use ‘F’ eg: F40017 my output value using a ‘Basiclabel’ is wrong. Is there a command or some code I can use to swap the bytes and word around. I tested the device output value with “ShortBus Modbus Scanner” software and it gives the proper output value when float value is swapped. Can someone please help, my VB.net skills are very limited.

Thanks
Stewart

Pages: [1]