EtherCAT:EC ASSOCIATE PDO TO SYS DIO/zh-hans

From SoftMC-Wiki
Jump to: navigation, search
语言: [[::EtherCAT:EC ASSOCIATE PDO TO SYS DIO|English]]  • [[::EtherCAT:EC ASSOCIATE PDO TO SYS DIO/zh-hans|中文(简体)‎]]

{{{DESCRIPTION}}}

Input

slave address, PDO index, PDO sub-index, First SYSTEM digital output.
range - number of digital IOs mapped to the relevant PDO
inherent_offset - In some slaves, like the STX CDHD, the PDO's size is 32 bits but the DIOs are mapped from 16 to 32, therefore the inherent offset is 16.

Output

None

Return Value

None

Declaration

public sub EC_ASSOCIATE_PDO_TO_SYS_DIO(byval slaveAddr as long, byval PDOindex as long, byval PDOsubindex as long, byval systemDIOnumber as long, byval range as long, byval inherent_offset as long)

Syntax

call EC_ASSOCIATE_PDO_TO_SYS_DIO(<Slave address>, <PDO index>, <PDOS sub-index>, <first SYSTEM digital output>, <range>, <inherent offset>)

Examples

call EC_ASSOCIATE_PDO_TO_SYS_DIO(drive_addr, 0x60FD, 0x0, drive_addr*100, 11, 16) ' 16 - inherent offset in 60FD to digital inputs
call EC_ASSOCIATE_PDO_TO_SYS_DIO(drive_addr, 0x60FE, 0x1, drive_addr*100, 6, 16) ' 16 - inherent offset in 60FE to digital outputs
If drive_addr == 3, the last example maps the drive's first digital output to the system digital output bit number 300,
drive's second digital output to system digital output bit number 301, and so on until Drive Dout 11 and System DOut 311.

See Also