Here’s what more than 2,500 business decision-makers around the world say.Download the report
...with the Facility Hero app in hand! Discover how you can optimize your maintenance efforts today.Learn more
Access tailored services, 24/7 self-service and expert help. Anywhere, anytime, any project.Discover now
Everything you need to know about our IoT technology backbone.Learn more
Explore our global offerings or select your country from one of our five regions.Global
Découvrez nos offres globales ou sélectionnez votre pays dans l’une de nos cinq régions.
Goals and Symptoms
This document describes how to build a small application that will use Twido Macros Comm to exchange data with one or more Ethernet devices.
Facts and Changes
Hardware used: TWDLCAE40DRF or TWDLCDE40DRF (only this hardware can be used with this application)
Software used: TwidoSuite version 2.31.04
Causes and Fixes
Given below is the step by step procedure on how to build the application:
2. Enter the IP address of your Twido controller.
4. Select the Program tab on the top-left, Configure tab on the top-right, Advance object, Macros Comm and check Conf check box for Comm 0 and Comm 1.
Network address 2 corresponds to IP address 192.168.100.32.
Our example will use Network address 1 for Comm 0 and Network address 2 for Comm 1.
5. We will read /write two words from each IP address 192.168.100.31 and 192.168.100.32. The table below allocates %MW words for the Macros Comm and those %MW words should not overlap with other macros or be used for something else in the program.
Number of words: number of %MW words allocated starting with the starting address.
In our example, for Comm 0:
C_RDNW: Start address 0 or %MW0, we read two words. The number of reserved words is N+7 or 2+7=9, from %MW0 to %MW8
C_WRNW: Start address 10 or %MW10, we write two words. The number of reserved words is N+9 or 2+9=11, from %MW10 to %MW20
C_RDNW: Start address 30 or %MW30, we read two words. The number of reserved words is N+7 or 2+7=9, from %MW30 to %MW38
C_WRNW: Start address 40 or %MW40, we write two words. The number of reserved words is N+9 or 2+9=11, from %MW40 to %MW50
- Address of first word to write (the address in the slave device)
- Value of first word to write (in the register located in the slave). When more than one register is written use the next register (e.g. Value of first word to write, %MW16, the second value will be in %MW17)
- Value of first word read (from the register located in the slave). When more than one register is read use the next register (e.g. Value of first word read, %MW7, the second one will be in %MW8)
7. You can execute only one Macros Comm function at a time. The attached program example has logic that will make sure only one Macros Comm function is active at a time.
8. Explanation of the Macros Comm syntax:
C_WRNW 1 2: it uses Macro Comm 1 and it writes two words
(Removed File URL: 212676_E0D2/Twido_Macros_Comm_Ethernet_resolution.zip)(Removed Image URL: /PubResEXPORT.nsf/2b87ee90be777fc085257c28006ee4ef/26ebaa7190afe12dc1257bc30012081a/fl_block_5/0.106?OpenElement&FieldElemFormat=gif)(Removed File URL: 212676_E0D2/Twido_Macros_Comm_Ethernet_program.zip)(Removed Image URL: /PubResEXPORT.nsf/2b87ee90be777fc085257c28006ee4ef/26ebaa7190afe12dc1257bc30012081a/fl_block_5/0.AF6?OpenElement&FieldElemFormat=gif)
Sign up for all the latest solutions, offers and best practices straight to your inbox.
We are excited that you have joined the group. You will receive your welcome email soon describing the program and what to expect in the upcoming weeks. Enjoy!