AdvancedHMI Software

General Category => Support Questions => Topic started by: Martinus on November 01, 2014, 09:16:01 AM

Title: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post 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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Archie on November 01, 2014, 09:39:10 AM
See this thread:

http://advancedhmi.com/forum/index.php?topic=428.0
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Martinus on November 01, 2014, 10:18:14 AM
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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Archie on November 01, 2014, 10:23:53 AM
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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Martinus on November 03, 2014, 09:52:17 AM
Hello,

I must be doing something wrong because i can't get it to work :-(

Couple of questions:

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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Archie on November 03, 2014, 11:07:06 AM
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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Martinus on November 04, 2014, 04:11:31 AM
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


Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Archie on November 04, 2014, 06:05:50 AM
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.
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Martinus on November 04, 2014, 09:33:02 AM
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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Archie on November 04, 2014, 10:23:42 AM
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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Martinus on November 05, 2014, 02:25:43 AM
Hello Archie,

I wil have a look into the program.

Does the advanced HMI ModbusRTU also use the CrC?

Greets

Martinus
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Martinus on November 05, 2014, 04:42:41 AM
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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Archie on November 05, 2014, 05:28:35 AM
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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Martinus on November 05, 2014, 06:00:14 AM
Archie,

That was it :-)

Basic label is working, thanks for the good support

now gonna work it out

Greets

Martinus
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Martinus on November 05, 2014, 09:15:43 AM
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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: fohdeesha on November 05, 2014, 10:26:05 AM
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 :)
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Archie on November 05, 2014, 07:19:28 PM
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.
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: fohdeesha on November 05, 2014, 08:44:06 PM
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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: fohdeesha on November 10, 2014, 05:50:49 AM
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
Title: Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
Post by: Archie on November 10, 2014, 06:56:55 AM
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