当前位置:网站首页>[tutorial 19 of trio basic from introduction to proficiency] detailed introduction of trio as a slave station connecting to the third-party bus (anybus PROFIBUS DP...)

[tutorial 19 of trio basic from introduction to proficiency] detailed introduction of trio as a slave station connecting to the third-party bus (anybus PROFIBUS DP...)

2022-07-05 08:03:00 Changjiang houlang blog

        In practice , It is often necessary to put Trio Connect to the third-party bus as a slave . You may need to use the content of this article .

This article selects some special cases to introduce :

    RS232/RS485 Bus :Modbus RTU、Hostlink、 be based on socket The way ,TRIO Support full duplex communication operation , The controller body has its own communication interface , No external interface required .

    Ethernet Bus :TCP 、Ethernet/IP、UDP Full duplex communication operation 、 be based on socket The way , The controller body has its own communication interface , No external interface required .

    CAN Bus :CANOPEN、DRIVENET、TrioBUS, The controller body has its own communication interface , No external interface required .

    Anysbus Bus : need MC664/MC664X Anybus Sub modules support implementation ,

The supported modules are shown in the figure below :

      As the interface of the terminal, there are Ethercat、RTEX、Sercos、SLM Communications , Not the focus of this article .

Next, let's focus on Anybus Under communication Profibus-DP Realization of communication

    Use GSD The file has been uploaded to the resource page : Update the download address later

   Trio The required code explanation :

'Anybus Insert the slot number occupied by the controller 
anyb_slot=0
' The slave address assigned by the master 
anyb_adr=3

' Site configuration information 
'value = ANYBUS(1,slot [, address, baud])
?ANYBUS(1,anyb_slot,anyb_adr)

' Automatically configure site information 
' among 100 It specifies the starting address of control communication input , Changeable 
' among 200 It specifies the starting address of control communication output , Changeable 
?ANYBUS(4, anyb_slot, anyb_adr, 0, 100, 200)

' Print configuration information 
ANYBUS(0,anyb_slot)

Trio As a slave station, the configuration is relatively simple , That's all , Thank you for taking the time to read .

 

 

原网站

版权声明
本文为[Changjiang houlang blog]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140547277838.html