Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Codesys 3.5 SP13 Modbus Asyril

Studiologe
2018-09-06
2018-09-09
  • Studiologe - 2018-09-06

    Hello,
    did anyone have any luck controlling an Asyril Flex Feeder via Modbus with Codesys 3.5 SP13?

    I have attached chapter 6 of the manual for the Asyril, but since I have never used modbus before, I'm unsure of the configuration. In that chapter there is a description of the registers and their address or offset.

    At this point I'm unsure how to get data from the device, or how to send data, as none of the settings make sense. If I guess correctly, then I will have to add Reading and Writing.

    What I need to know:
    1) Is my configuration so far correct?
    2) How do I for example read a simple status or error register of the device?

    Any hints will be greatly appreciated.

    Thanks

    IMG: Slave Channel.png

    IMG: Screenshot.PNG

    Chapter 6.pdf [530.7 KiB]

     
  • eschwellinger

    eschwellinger - 2018-09-06

    hi,
    as you see in the pdf function code 3 and 10 are supported.. but did not read the manual in detail.
    But i guess you will manage to do this.

    BR
    Edwin

     
  • Studiologe - 2018-09-06

    Thanks Edwin,

    that's exactly what I have had configured, but to no avail. I've been playing around with this all day yesterday, but was unable to get it working properly. Attached are some more screenshots I took, to show the configuration I have tried.

    When ever I try to write a 1 to the TRG variable, nothing happens.

    Any idea what I might be missing? I know the manual says that "... up to 125 registers can be read at once and only up to 123 registers can be written at once...", but also that "... It is recommended to alternate between the different read/write requests..."

    I know that I'm not reading anything back, and I don't think I have to, unless I want the info about the status and such. At this point I'm just trying to get it somehow working, so that I can build up my program from there.

    Any help will be greatly appreciated.

    IMG: 1.PNG

    IMG: 2.PNG

    IMG: 3.PNG

     
  • johnlee - 2018-09-09

    hi Studiologe,

    according to the pdf you providing all the address are fall under holding register where using function Code 3 to read and code 6 to write single address or code 16 to write into multiple address.

    As according your document the base address is 0, so you have to configure codesys where base is 0.

    I have done many modbus tcp/ip or rtu project, so most of time before we do the setup on codesys we will using Modscan to double verify the modbuss address on the device is tally with the document.

    Always to take note, some of address is can't be read and in single or multiple, so the Modscan tool is the tool where to help you to verify.

    Thank you
    John Lee

     

Log in to post a comment.