Difference between revisions of "EtherCAT:DIGITAL-IOS"

From SoftMC-Wiki
Jump to: navigation, search
Line 28: Line 28:
 
A dedicated MC-Basic function exists in ETHERACT.LIB to notify the softMC about IO module's PDOs,<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/>
 
and immediately tie those PDO entries to system digital IOs, thus creating the mapping desired by the user:<br/>
[[Axystems: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:Axystems:EtherCAT:SETUP-EC|Setup EtherCAT]] for an example how to use these functions.<br/>
 
Please refer to the page [[:Category:Axystems:EtherCAT:SETUP-EC|Setup EtherCAT]] for an example how to use these functions.<br/>

Revision as of 08:34, 22 May 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
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 Drive IOs

Two dedicated MC-Basic functions exist in ETHERACT.LIB to create this association:
EC_ASSOCIATE_DRIVE_DINS
EC_ASSOCIATE_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.