Author Topic: Modbus RTU - KOYO PLC  (Read 7430 times)

Kasky

  • Newbie
  • *
  • Posts: 9
    • View Profile
Modbus RTU - KOYO PLC
« on: September 24, 2014, 01:12:31 PM »
I've read through the post about Koyo PLC's and found a host of good information and have been able to get the latest version of the software installed and have almost everything working well except when trying to address a Click "DF" register.
I believe DF is (D)ouble word (F)loating point value. The Modbus address the Click software offers up looks like this:
Modbus address (function code) 428673 (03,06,16)
I am trying to read/right to this register and have had no luck.

Admit tingly I know little about Modbus addressing and have gotten as far as I have from examples and posts on this forum.
Any help will be greatly appreciated.

Thank you
« Last Edit: September 24, 2014, 03:15:49 PM by Kasky »

fohdeesha

  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: Modbus RTU - KOYO PLC
« Reply #1 on: September 24, 2014, 05:10:27 PM »
The modbus driver in advancedHMI does not support floating point, so that's the problem you're running into. sounds like you've got everything else working though.

As a workaround what I've done to display floating point numbers, like the temperature DF value of 72.5, I multiple that register by 10 in the plc and put the result in an integer register (DS), so that integer register ends up being 725.

Then in AdvancedHMI with a digital panel meter I'll read that integer, and in the meter properties you can scroll down and find "decimal location", change it to 1 and it'll put a decimal one digit in so you end up displaying 72.5 : )

You can multiply by 100 or 1000 and move the decimal place accordingly for as much accuracy as you need. If you apply all of this but in reverse it should also work great for writing to DF registers







Hope that helps! I was kind of bummed about not being able to read floating point but then realized I can display all the decimal point accuracy I need by doing the above
« Last Edit: September 24, 2014, 09:09:26 PM by fohdeesha »

Kasky

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Modbus RTU - KOYO PLC
« Reply #2 on: September 25, 2014, 09:16:30 AM »
Thank you for your response!
Having been programming the Koyo 05 and 06's for going on 15 years now I am well versed in the assuming a decimal point :)

Just knowing the DF registers in the Click are not going to work at all is going to save me a ton of time, thank you.

Joe.

TheTinker

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Modbus RTU - KOYO PLC
« Reply #3 on: February 25, 2016, 04:59:33 PM »
To help others who come to this post with the same problem, To read and write to the DF registers in Koyo (CLICK) plc's, place a F in front of the Modbus address in AdvacedHMI setup. For example, if I'm trying to read the value in DF201, The modbus address would be F429073.  The Click DF registers are fully accessible this way.

Hope this can help someone else out.

Sam

fohdeesha

  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: Modbus RTU - KOYO PLC
« Reply #4 on: April 12, 2016, 05:13:36 AM »
Yup, several months after our replies above Archie kindly added in the ability to directly read/write float registers over modbus RTU. That Archie is a machine!

This is one of the reasons I wish there was an up to date detailed manual somewhere with thorough instructions for each driver and element, he adds so many little features like this so often it can be hard to keep track of what's supported where these days
« Last Edit: April 12, 2016, 05:25:37 AM by fohdeesha »

zaym84

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Modbus RTU - KOYO PLC
« Reply #5 on: May 07, 2016, 09:16:57 AM »
I have read though all the ModBus RTU addressing i could find and maybe I am missing something but i cannot get a simple button to work with C1 in my Click PLC.
I made a simple program that turns on Y1  and leave it on when I press an external button (X1), I replace the X1 with C1 and would like to use a simple button in HMI to turn on Y1. C1 had the address of 16385 (01,05,15)
can someone tell me what address I should enter to have HMI set C1 to true? And where would put the address?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Modbus RTU - KOYO PLC
« Reply #6 on: May 08, 2016, 02:40:58 AM »
See this post:

http://advancedhmi.com/forum/index.php?topic=1190.msg6236#msg6236

If you look at the Address Picker, select show Modbus addresses, then precede that address with a 0 (only for the bits) and you will get something like this for C1:

016385

zaym84

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Modbus RTU - KOYO PLC
« Reply #7 on: May 09, 2016, 10:27:19 AM »
Thanks for getting back with me !!!

I believe I understand how to the addressing works now and will give it a try when i get off work today.
In Advance HMI when setting lets say a button up with the PLC address what are the different attributes for:

PLCAddressClick:
PLCAddressText:
PLCAddressValue:
PLCAddressVisible:

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Modbus RTU - KOYO PLC
« Reply #8 on: May 09, 2016, 12:30:41 PM »
As a general rule, the name attached to PLCAddress is the name of a property which is set by the value from the PLC. For example, if you put 40001 in PLCAddressText, then the value in register 40001 will be put in the Text property of the object. If you want to see what the Text property does, while in design view put something in that property.


There are a few exceptions to this such a PLCAddressClick. This will be the register in which a 1 or 0 is written to when the button or object is close clicked.

zaym84

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Modbus RTU - KOYO PLC
« Reply #9 on: May 11, 2016, 08:02:45 PM »
I still cannot get a basic button to set C1 in the PLC,
In the PLC program I have C1 setting the Y1 coil on and I want to use C2 to reset the coil to off
C1 is address as 16385 so I set PLCAddressClick (in HMI) to 016385
and when I click the button nothing happens....

The one thing i find strange is when I set the same basic button to the Y1 (008193) and run the program when i click the button the Y1 output coil will turn on but only for a split second.

Am I over looking something?
 
I have the modbusRTUcom1 driver setup as follows:
BaudRate                     38400
databits                        8
disablesubscriptions     False
DenerateMenber           True
MaxReadGroupSize      20
Modifiers                      Friends
Party                            Odd
PoolRateOverride         500
PortName                    COM4 (same com i program the PLC with)
StationAddress           1
StopBits                     One
SwapBits                    True
TimeOut                     5000

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Modbus RTU - KOYO PLC
« Reply #10 on: May 11, 2016, 08:27:21 PM »
I still cannot get a basic button to set C1 in the PLC,
In the PLC program I have C1 setting the Y1 coil on and I want to use C2 to reset the coil to off
C1 is address as 16385 so I set PLCAddressClick (in HMI) to 016385
and when I click the button nothing happens....

The one thing i find strange is when I set the same basic button to the Y1 (008193) and run the program when i click the button the Y1 output coil will turn on but only for a split second.
Are you trying to get the button to toggle the bit, set it on, or momentarily set it while holding the button down?

zaym84

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Modbus RTU - KOYO PLC
« Reply #11 on: May 16, 2016, 08:09:27 PM »
Momentarily set it while holding the button down

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Modbus RTU - KOYO PLC
« Reply #12 on: May 16, 2016, 08:14:44 PM »
The one thing i find strange is when I set the same basic button to the Y1 (008193) and run the program when i click the button the Y1 output coil will turn on but only for a split second.
Are you using Y1 in your PLC program? If so, then most likely the HMI sets it true, but then you PLC program immediately sets it false.