AdvancedHMI Software
General Category => Support Questions => Topic started by: Martinus on November 01, 2014, 09:16:01 AM
-
Hello,
I'm new at this so correct me if i'm wrong :-)
Is it possible to use advancedhmi in the following settings:
Windows 7 laptop <--> usb to rs458 converter <---> Servo drive with modbusRTU
Manny thanks for your reply
Greets
Martinus
-
See this thread:
http://advancedhmi.com/forum/index.php?topic=428.0
-
See this thread:
http://advancedhmi.com/forum/index.php?topic=428.0
Hi,
So it should be possible :-)
Is there a quick manual about how to get started with this modbusRTU driver.
I hope i'l get it working to..... there is a lot where i can use it for
thanks
Martinus
-
It follows the same pattern as in the Quick Start.
- Add a ModbusRTU driver to the form
- Set the appropriate properties of the driver (e.g. com port, baud rate, etc)
- Add a control (BasicLabel, DigitalPanelMeter, etc) to the form
- Set the PLCAddressValue property to a Modbus address (e.g. 40001)
- Run the application
-
Hello,
I must be doing something wrong because i can't get it to work :-(
Couple of questions:
- How can i see that there is indeed a modbus connection?
When i look into my driver manual for instance the parameter UDC_act has Modbus adress 7198.
But when i'm using this i get the a mesage saying that the adres must be 5 to 7 digits
What am i doing wrong
Martinus
-
The driver uses the first digit to interpret the function code. An address of 7198 only specifies the offset. If it is an integer value , the address should be. 41798
If it is a bit you would use 07198
-
Hello Archie,
Thanks for your answers so far..... unfortunally it is stil not working.
Some details:
The servo drive is a LXM05 from Schneider
The cable:
A nudam ND 6530 converter.
What works:
I have a 2 old visual basic 6 routines....one with a modbus dll and one with a activex component.
Both work.
The software for reading and adjusting parameters inside the drive works.
What did i try:
Opend studio express 2010
load advanced.sln
Rebuild it
placed the modbusrtu driver
Settings :COM3, 19200,8,even,1
placed : MessageDisplayByValue1
Settings: PplcAdresVallue: 47198 (adres 7198 is a read only uint16 adres and should return a voltage value)
The drive has node adres 1 and is placed in modbus mode
If you would like more info please let me know
What can i do more?
Martinus
-
Try using a BasicLabel, it will show any errors from the driver. The MessageDisplayByValue has to be populated with a list of messages before you would see anything.
-
Hi Archie,
Also tried the basic label, but no smile for me :-(
I also tried a activex component which i found and it worked.. see the attachment.
The string is 1,3,7198,2 + CrC code
1 = node
3 = function code
7198 = parameter (read only)
2 = 2 registers
Is this the same way the advanced hmi sends it away?
Martinus
-
If you are not using a 64 bit operating system, download Free Serial Port monitor to look at the packet and response. If you do have 64 bit, you can use Device Monitoring Studio
-
Hello Archie,
I wil have a look into the program.
Does the advanced HMI ModbusRTU also use the CrC?
Greets
Martinus
-
Hello Archie,
I wil have a look into the program.
Does the advanced HMI ModbusRTU also use the CrC?
Greets
Martinus
I did some testing and found the following:
When i use function code 3 .....i see on my bus monitor function code 4 and visa versa.
And when i send adres 7700 i see on my bus monitor 7699.
Further more i can see that it read one register, how can i change this to 2.
Bus code:
01 03 1E 14 00 01 C2 26
|
02
Greets
Martinus
-
If you are reading a double integer, precede the address with an L , so you would use L47198
If it is a float, then precede it with an F
-
Archie,
That was it :-)
Basic label is working, thanks for the good support
now gonna work it out
Greets
Martinus
-
Hello Archie,
If i wanted to write a value 20 to register "8454" wich is a int16
would this then be :
ModbusRTUCom1.Write("L168454", 20)
thanks
Martinus
-
If you are reading a double integer, precede the address with an L , so you would use L47198
If it is a float, then precede it with an F
wait, does the modbusRTU driver now properly read and display float values and all we have to do is prepend an L? this changes everything! I have a lot of ladder logic converting float into integer values with an implied decimal just for HMI display I can clean up now :)
-
If you are reading a double integer, precede the address with an L , so you would use L47198
If it is a float, then precede it with an F
wait, does the modbusRTU driver now properly read and display float values and all we have to do is prepend an L? this changes everything! I have a lot of ladder logic converting float into integer values with an implied decimal just for HMI display I can clean up now :)
You precede floats with an "F" and long integers (4 bytes) with an "L"
This should work for both reading and writing.
-
Err yeah I meant an F heh. That's great news, I'll have to try it out once I get a new v3.80 project going
-
So I went ahead and tried some meters and a basic label reading a float register and I couldn't get it to work. Was this introduced in 3.80? I'm still on 3.70
I put for instance F428681 in the plcaddressvalue field, but when I launch the app it states that is an invalid address
Maybe I'm doing something wrong, not sure! can't complain too much as reading integers and adding a decimal point works great
-
So I went ahead and tried some meters and a basic label reading a float register and I couldn't get it to work. Was this introduced in 3.80? I'm still on 3.70
I put for instance F428681 in the plcaddressvalue field, but when I launch the app it states that is an invalid address
This was added in version 3.80
Version 3.81 will be released in a few days that fixes the problem with writing to Long integers