Difference between revisions of "EtherCAT:DIGITAL-IOS"
Line 20: | Line 20: | ||
==Attaching System IOs to Drive IOs== | ==Attaching System IOs to Drive IOs== | ||
Two dedicated MC-Basic functions exist in ETHERACT.LIB to create this association:<br/> | Two dedicated MC-Basic functions exist in ETHERACT.LIB to create this association:<br/> | ||
− | [[EtherCAT:EC | + | [[EtherCAT:EC SET DRIVE DINS|EC_SET_DRIVE_DINS]]<br/> |
− | [[EtherCAT:EC | + | [[EtherCAT:EC SET DRIVE DOUTS|EC_SET_DRIVE_DOUTS]]<br/> |
<br/> | <br/> | ||
Line 31: | Line 31: | ||
[[EtherCAT:EC IOMODULE ASSOCIATE PDO|EC_IOMODULE_ASSOCIATE_PDO]]<br/> | [[EtherCAT:EC IOMODULE ASSOCIATE PDO|EC_IOMODULE_ASSOCIATE_PDO]]<br/> | ||
<br/> | <br/> | ||
− | Please refer to the page [[:Category:EtherCAT: | + | Please refer to the page [[:Category:EtherCAT:EC_SETUP|Setup EtherCAT]] for an example how to use these functions.<br/> |
}} | }} | ||
Revision as of 14:33, 6 October 2014
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 | |
It is up to the user to assign system IOs carefully, and make sure that the same system IO isn't mapped |
Attaching System IOs to Drive IOs
Two dedicated MC-Basic functions exist in ETHERACT.LIB to create this association:
EC_SET_DRIVE_DINS
EC_SET_DRIVE_DOUTS
Attaching System IOs to an IO Module
An IO module doesn't allow reading information about its available PDOs. This information must be inserted
manually by the user. Each PDO entry is used to read or write an input or output of the IO module.
A dedicated MC-Basic function exists in ETHERACT.LIB to notify the softMC about IO module's PDOs,
and immediately tie those PDO entries to system digital IOs, thus creating the mapping desired by the user:
EC_IOMODULE_ASSOCIATE_PDO
Please refer to the page Setup EtherCAT for an example how to use these functions.