Slave Channel Trigger with Modbus TCP

JAPIB
2018-05-14
2020-07-08
  • JAPIB

    JAPIB - 2018-05-14

    Hello

    When setting a slave channel, we can choose a trigger ; Cyclc, Rising Edge or Application.
    With Application, what FB (or other thing) should we use ?

    With the same, for a Modbus serial slave, J use ModbusChannel FB and it works well.

    On line help, doesn't mention this possibility (Application).

    Thank you in advance for your help.

     
  • eschwellinger

    eschwellinger - 2018-05-15

    Hi,

    Each defined modbus channel of a slave can be triggered by a function block with the usual inputs (xExecute) and outputs (xError, errorCode etc..)
    The channel that is to be executed is referenced by the index of the channel (as displayed in the Modbus-Slave configurator's channel-page. The latter one gets a new column with the Channel-index (same value that is used for referencing the channel in the application)
    There's an additional new Trigger "Application" for the channels.

    BR
    Edwin

    IMG: ModbusChannel.jpg

     
  • JAPIB

    JAPIB - 2018-05-15

    Hi Edwin,
    "ModbusChannel" works well with Modbus RTU slave.

    But with Modbus RTU, when I build my project with variable declaration
    Channel1:ModbusChannel;
    I get an error : Identifier 'ModbusChannel' not defined.

    When I search the word "ModbusChannel" into the library manager it found the library IoDrvModbusTCP, (already installed), but when I look inside this library (into the library manager) I don't see "ModbusChannel" !! (And I got news glasses last week !! )

    BR
    JAPIB

     
  • eschwellinger

    eschwellinger - 2018-05-15

    Hi,
    which Version are you using exactly?

    BR
    Edwin

    IMG: ModbusChannel.jpg

     
  • JAPIB

    JAPIB - 2018-05-15

    Hi Edwin

    I used an old project, which I updated with CODESYS V3.5 SP12 Patch3.
    I have updated the PLC and ... forgot to update MOdbus_TCP_MAster and MOdbus_TCP_Salve (3.5.11.0)

    Thank you very much Edwin for your help.
    It's a beginner's mistake

    BR.

    JAPIB

     
  • pcimatti - 2019-10-26

    Hi Edwin, just a question:
    why with some libraries like IoDrvModbusTCP the autocompletion (CTRL + Space) doesn' t work?

    The selection form doesn't indicate the FBs of the library
    Is it a Bug or I should enable some checkboxes?

    BR, and Thanks in advance,
    Paolo Cimatti

    IMG: 2019

     
  • johant - 2020-07-08

    Hello,
    I am working on a Project that consists on controlling IAI axis via MODBUS RTU with a Raspberry pi based on codesys, and I need some support. I would like to know if there is any function to write variable´s values directly in modbus communication channels. Instead of linking them in the Reading and writing channels, I want to know if there is any function to write these variable´s values in the communication channels automatically.
    I will be waiting for your answer.

    Thank you.

     

Log in to post a comment.