Difference between revisions of "EtherCAT:DIGITAL-IOS"

From SoftMC-Wiki
Jump to: navigation, search
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Languages|EtherCAT:DIGITAL-IOS}}
 
{{Category
 
{{Category
 
|description=Digital Inputs/Outputs.
 
|description=Digital Inputs/Outputs.
Line 11: Line 12:
 
Sys.dout[<first system digital output bit>][<Range>] = <''value''><br/>
 
Sys.dout[<first system digital output bit>][<Range>] = <''value''><br/>
 
<br/>
 
<br/>
==IMPORTANT !!!==
+
{{Note/Important|
 
It is up to the user to assign system IOs carefully, and make sure that the same system IO isn't mapped<br/>
 
It is up to the user to assign system IOs carefully, and make sure that the same system IO isn't mapped<br/>
 
to more than one IO (of a motion drive or an IO module).<br/>
 
to more than one IO (of a motion drive or an IO module).<br/>
 
<br/>
 
<br/>
 
Behavior is UNDEFINED if this rule is broken !!!<br/>
 
Behavior is UNDEFINED if this rule is broken !!!<br/>
<br/>
+
<br/>}}
==Attaching System IOs to Drive IOs==
+
 
Two dedicated MC-Basic functions exist in ETHERACT.LIB to create this association:<br/>
+
==Attaching System IOs to EtherCAT slave IOs==
[[EtherCAT:EC ASSOCIATE DRIVE DINS|EC_ASSOCIATE_DRIVE_DINS]]<br/>
+
In an EtherCAT slave the digital IOs are handled by reading/writing to certain objects. These objects are mapped to PDO. Naturally, inputs are mapped to Tx PDOs (Slave to Master) and outputs are mapped to Rx PDOs (Master to Slave). The association between the relevant PDO, number of IOs, etc, is done using the subroutine [[EtherCAT:EC_ASSOCIATE_PDO_TO_SYS_DIO|EC_ASSOCIATE_PDO_TO_SYS_DIO]].<br/>
[[EtherCAT:EC ASSOCIATE DRIVE DOUTS|EC_ASSOCIATE_DRIVE_DOUTS]]<br/>
 
<br/>
 
  
==Attaching System IOs to an IO Module==
+
Please refer to the page [[EtherCAT:EC INSTALL STX CDHD|EC_INSTALL_STX_CDHD]] for an example how to use this function.<br/>
An IO module doesn't allow reading information about its available PDOs. This information must be inserted<br/>
 
manually by the user. Each PDO entry is used to read or write an input or output of the IO module.<br/>
 
A dedicated MC-Basic function exists in ETHERACT.LIB to notify the softMC about IO module's PDOs,<br/>
 
and immediately tie those PDO entries to system digital IOs, thus creating the mapping desired by the user:<br/>
 
[[EtherCAT:EC IOMODULE ASSOCIATE PDO|EC_IOMODULE_ASSOCIATE_PDO]]<br/>
 
<br/>
 
Please refer to the page [[:Category:Axystems:EtherCAT:SETUP-EC|Setup EtherCAT]] for an example how to use these functions.<br/>
 
 
}}
 
}}
  
  
[[Category:Axystems:EtherCAT]]
+
[[Category:EtherCAT]]
 
[[Category:Control:Offline]]
 
[[Category:Control:Offline]]

Latest revision as of 06:54, 5 May 2017

Language: English  • 中文(简体)‎

EtherCAT:DIGITAL-IOS Digital Inputs/Outputs.

The front page is EtherCAT

The user can associate between system digital Inputs/Outputs and a motion drive’s digital inputs/outputs or an IO module inputs/outputs.
This association allows the user to set/get those IOs using the following MC-Basic syntax:

Read inputs:
?Sys.din[<first system digital input bit>][<Range>]

Write outputs:
Sys.dout[<first system digital output bit>][<Range>] = <value>

IMPORTANT.svgIMPORTANT

It is up to the user to assign system IOs carefully, and make sure that the same system IO isn't mapped
to more than one IO (of a motion drive or an IO module).

Behavior is UNDEFINED if this rule is broken !!!


Attaching System IOs to EtherCAT slave IOs

In an EtherCAT slave the digital IOs are handled by reading/writing to certain objects. These objects are mapped to PDO. Naturally, inputs are mapped to Tx PDOs (Slave to Master) and outputs are mapped to Rx PDOs (Master to Slave). The association between the relevant PDO, number of IOs, etc, is done using the subroutine EC_ASSOCIATE_PDO_TO_SYS_DIO.

Please refer to the page EC_INSTALL_STX_CDHD for an example how to use this function.