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 - Flemmingaa

Pages: [1]
1
Support Questions / Re: Read two consecutive 16 bit register - Modbus
« on: February 04, 2016, 11:14:08 AM »
I Archie

Dim value() As String = ModbusRTUCom.Read("3001", 2)
gives:
value(0) = 17253 (Dec) (It super and correct) that can I convert to bin
value(0) = -14240 (Dec) (a negative number) - how do I "read" that ?  what means "a negative number"

Can I get the "value" directly in hex ?

2
Support Questions / Read two consecutive 16 bit register - Modbus
« on: February 04, 2016, 09:10:21 AM »
Hi
From a device I like to read a parameter. Each parameter is held in two consecutive 16 bit register.

The data used, is in 32 bit IEEE 754 floating point format.

If I send the Requests:
01 04 00 00 00 02 71 F8
Adress:1
Function code:04
Starting address:0000
Quantity of registers:0002

I get:
01 04 04 43 65 7F 88 ED 49
Values: 43 65 7F 88
1. register "43 65" is the same as 17253 (Dec) and 0100001101100101 (bin)
2. register "7F 88" is the same as 32648 (Dec) and 0111111110001000 (bin)
and together
"43 65 7F 88" is 01000011011001010111111110001000

If I run this through "http://www.h-schmidt.net/FloatConverter/IEEE754.html"
I get 229.49817
It super and correct

Is there a way to read this through "ModbusRTUCom"
I think I've tried many things, but get some strange numbers

3
Support Questions / Re: ModbusRTU problems
« on: January 29, 2016, 10:30:20 AM »
Aaa Sorry Archie
The adresse in AdvancedHmi i 3030 and not 3029 so
Dim MyValues() As String = ModbusRTUCom1.Read("43030", 2)
works fine

Sorry and many thanks

4
Support Questions / Re: ModbusRTU problems
« on: January 29, 2016, 10:09:41 AM »
Dim MyValues() As String = ModbusRTUCom1.Read("3029", 2)
gives
"Illegal Function"

Dim MyValues() As String = ModbusRTUCom1.Read("43029", 2)
gives
"Illegal Data Address"

Dim MyValues() As String = ModbusRTUCom1.Read("3:3029", 2)
gives
"Illegal Data Address"

Dim MyValues() As String = ModbusRTUCom1.Read("3:43029", 2)
gives
"Illegal Data Address"

5
Support Questions / Re: ModbusRTU problems
« on: January 29, 2016, 10:02:28 AM »
Mmmm does not work
I can read coils without problems:
1 coil example:
ModbusRTUCom1.Read("0021", 1)
or 10 coils example:
ModbusRTUCom1.Read("0021", 10)

but not register

I know that the address 3029 is correct, because I can read it through "QModMaster"

6
Support Questions / Re: ModbusRTU problems
« on: January 29, 2016, 08:02:31 AM »
Thanks
but I get the error message "Illegal Data Address"
>   AdvancedHMIDrivers.dll!AdvancedHMIDrivers.ModbusBase.Read(String startAddress = "43029", Integer numberOfElements = 2) Line 170   Basic

I am new in "Modbus" through AdvancedHMI

7
Support Questions / ModbusRTU problems
« on: January 29, 2016, 07:12:00 AM »
Hi
How do I read register 3029 from a slave ?

Slave addr. = 1
Function code = 3
Registre addr = 3029
Number of registers = 2
This results in a Tx:  01 03 0B D5 00 02 D7 D7 (last 4 is CRC)

I can't convert it to ModbusRTUCom1.Read("3:3029", 2)   ? ?

Pages: [1]