Difference between revisions of "EtherCAT:EC REMAP MINIMUM PDOS"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Template:EtherCAT-Function |DESCRIPTION= This subroutine remaps the PDO's of a certain drive to the required minimum objects that allow sync position mode. {{Note/Importa...")
 
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{Languages|EtherCAT:EC_REMAP_MINIMUM_PDOS}}
 
{{Template:EtherCAT-Function
 
{{Template:EtherCAT-Function
  
 
|DESCRIPTION=
 
|DESCRIPTION=
This subroutine remaps the PDO's of a certain drive to the required minimum objects that allow sync position mode.
+
This subroutine remaps the PDO's of a certain drive to the required minimum objects that allow sync position mode.<br/>
 +
These objects are:<br/>
 +
Rx - Control Word 0x6040;0x0, Position Command 0x607A;0x0<br/>
 +
Tx - Status Word 0x6041;0x0, Position Feedback 0x6064;0x0, Digital Inputs 0x60FD;0x0<br/>
  
 +
Use this subroutine when integrating a softMC with a new or unknown motion drive to make sure it has the required minimum PDO entries to allow sync position motion.
 +
 +
{{Note|
 +
Use this subroutine as an example how to create you own PDO mapping}}
  
 
{{Note/Important|
 
{{Note/Important|
This subroutine must be invoked before [[:Category:EtherCAT:EC SETUP|EC_SETUP.PRG]] in executed, or right at the beginning of it, to allow MC to first rescan the slaves and get updated with the new PDO mapping of the devices}}
+
This subroutine must be invoked before [[:Category:EtherCAT:EC SETUP|EC_SETUP.PRG]] is executed, or right at the beginning of it, to allow MC to first rescan the slaves and get updated with the new PDO mapping of the devices}}
  
  
 
|INPUT=
 
|INPUT=
Motion cycle time: 4000 μs, 2000 μs, 1000 μs, 500 μs or 250 μs.
+
Slave address
If 500 μs or 250 μs cycle time is chosen, add to /FFS0/FWCONFIG the line: hpetfreq = 2000
 
  
 
|OUTPUT=
 
|OUTPUT=
Line 20: Line 27:
  
 
|DECLARATION=
 
|DECLARATION=
public sub EC_SET_BUS_CYCLETIME(byval cycle_time as long)
+
Public Sub EC_REMAP_MINIMUM_PDOS(byval drive_addr as long)
  
 
|SYNTAX=
 
|SYNTAX=
call EC_SET_BUS_CYCLETIME(<cycle_time>)
+
call EC_REMAP_MINIMUM_PDOS(<Slave address>)
  
 
|EXAMPLE=
 
|EXAMPLE=
call EC_SET_BUS_CYCLETIME(4000)<br/>
+
call EC_REMAP_MINIMUM_PDOS(2)
  
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[EtherCAT:EC_GET_BUS_CYCLETIME|EC_GET_BUS_CYCLETIME]]
 
 
* [[:Category:EtherCAT:EC SETUP|Setup EtherCAT]] - How to setup EtherCAT
 
* [[:Category:EtherCAT:EC SETUP|Setup EtherCAT]] - How to setup EtherCAT
  
 
}}
 
}}

Latest revision as of 14:47, 6 May 2017

Language: English  • 中文(简体)‎

This subroutine remaps the PDO's of a certain drive to the required minimum objects that allow sync position mode.
These objects are:
Rx - Control Word 0x6040;0x0, Position Command 0x607A;0x0
Tx - Status Word 0x6041;0x0, Position Feedback 0x6064;0x0, Digital Inputs 0x60FD;0x0

Use this subroutine when integrating a softMC with a new or unknown motion drive to make sure it has the required minimum PDO entries to allow sync position motion.

NOTE-Info.svgNOTE
Use this subroutine as an example how to create you own PDO mapping
IMPORTANT.svgIMPORTANT
This subroutine must be invoked before EC_SETUP.PRG is executed, or right at the beginning of it, to allow MC to first rescan the slaves and get updated with the new PDO mapping of the devices

Input

Slave address

Output

None

Return Value

None

Declaration

Public Sub EC_REMAP_MINIMUM_PDOS(byval drive_addr as long)

Syntax

call EC_REMAP_MINIMUM_PDOS(<Slave address>)

Examples

call EC_REMAP_MINIMUM_PDOS(2)

See Also