Author Topic: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive  (Read 5559 times)

Martinus

  • Newbie
  • *
  • Posts: 27
    • View Profile
Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« 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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI

Martinus

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #2 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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #3 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

Martinus

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #4 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:

  • 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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #5 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

Martinus

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #6 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



Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #7 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.

Martinus

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #8 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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #9 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

Martinus

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #10 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
« Last Edit: November 05, 2014, 04:33:33 AM by Martinus »

Martinus

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #11 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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #12 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

Martinus

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #13 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

Martinus

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Windows 7 laptop <--> usb to rs458 converter <---> Servo drive
« Reply #14 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