Jump to content
OMRON Forums

Macro I variable read


JeffLowe

Recommended Posts

I have been searching for some example script code showing how to read a macro I variable. I am using a Copley Xenus Macro drive with absolute encoders. The power on absolute position is available in i920 as a 32 bit integer which I would like to use as power on position for my axes. In the Macro documentation I have found some commands one of which is :

MacroAuxiliaryRead , < Global Var>

Read an MI, MM, MP or MQ variable from to

 

There is no documentation on what the meaning of MI,MM,MPor MQ mean nor any syntax for making such a call.

Does anyone have this information, or perhaps better Macro documentation or some example code?

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Note that if the "EncType" is set to 4 this is automatically setup by the firmware to read the absolute position on a HMZ command for the enumerated motor. If you set this up by hand follow the procedure as specified by this motor structure.

 

Having said that the "macroslaveread" read command can be used to get the value of an MI-variable into a PPMAC variable. This command is described in the "Power PMAC Macro Command Specification" on our Forum's FileDepot and also in the example "MACRO" project's "Documentation" folder in the IDE installation.

Link to comment
Share on other sites

Type 4 is for Sinusoidal/arctangent extension which are incremental by nature, typically an ACC51E card. My system is a Macro system based on the Copley XML drives. A BissC encoder (Renishaw Resolute) comes in through the drive and is presented in Macro register 0 as the upper 24 bits in a 32 bit word. Standard parallel word position feedback stuff. The encoder itself is a 32 bit, so even if I do a power on absolute position from the node's Macro Register 0, I will be missing the upper eight bits. There does not appear to be any automatic way of retrieving the full 32 bit position from a macro node for initial power-up absolute positioning. What I need is a piece of script plc to be executed at startup to read this 32 bit position from i920 and stuff it into the motor's position register before servo on.
Link to comment
Share on other sites

To use the value in MI920 over MACRO set Motor[x].AbsPosFormat = $aabbccdd, the $dd byte is set to $20 (32). The $cc byte specifies the number of bits to be used from the reported value of the MI920 parameter, and the $bb byte specifies the number of the starting bit to be used from this value.

 

For a signed 32 bit read:

Motor[x].AbsPosFormat is set to $01002020.

aa = $01 is signed

bb = $00 just this read (32 bits from 0)

cc = $20 is 32 bits

dd = $20 is MACRO

 

The address over the MACRO ring is specified by the MACRO node in Motor[x].pEncStatus and although Motor[x].pAbsPos is not actually used it should be set the same as it must be greater than zero to enable this function.

Link to comment
Share on other sites

To use the value in MI920 over MACRO set Motor[x].AbsPosFormat = $aabbccdd, the $dd byte is set to $20 (32). The $cc byte specifies the number of bits to be used from the reported value of the MI920 parameter, and the $bb byte specifies the number of the starting bit to be used from this value.

 

For a signed 32 bit read:

Motor[x].AbsPosFormat is set to $01002020.

aa = $01 is signed

bb = $00 just this read (32 bits from 0)

cc = $20 is 32 bits

dd = $20 is MACRO

 

The address over the MACRO ring is specified by the MACRO node in Motor[x].pEncStatus and although Motor[x].pAbsPos is not actually used it should be set the same as it must be greater than zero to enable this function.

 

This does something, but I am not sure what. I have pointed the encoder status to [NODE][3] register 3 which contains the other encoder status information such as encoder loss, position compare, and position loss. The values on startup are not the same as the amplifier reports. The system is a gantry system with absolute encoders. The drives are showing X1, and X2 positions within half a millimeter, (342.1xxx mm vs 341.7xxx) The PMAC reports thes2 as 600 something mm and 0 7xxx mm.

Further suggestions?

Link to comment
Share on other sites

If you read MI920, does that have the correct ABS position data?

 

I don't know how to read MI920. I have been asking this throughout this thread. Nothing in the Power PMAC MACRO manual shows how to do this. (Note: The manual is very good and comprehensive on setting up the hardware, establishing the ring, and getting servo data to and from the ring)

What I am finding is that the available documentation and the macro project lack any definition of the nomenclature used. My system consists of a Power PMAC CPU, an ACC5e3, which provides two rings: ring 0 and ring 1, I am only using ring 0, and on it I have 6 Copley Xenus drives, and an ACC11M, used as a triple node.

The documentation and example projects talk a lot about macro masters and macro slaves addressing stations with i6840 and i6841 which to my way of thinking are turbo pmac stuff and must be for addressing macro 8 axis and 16 Axis Macro CPUs

 

The two Copley drives that contain absolute position in i920 are on ring 0, at node 0 and node 1.

Can you please show me how to get these MI920 variables from the drives?

Thanks,

Link to comment
Share on other sites

You would use the “macroslave{node#},M{slave var}” on-line command. In your case:

macroslave 0, MI920

macroslave 1, MI920

 

This command is described in the "Power PMAC Macro Command Specification" found in the example project's "Documentation" folder in the IDE installation for "PowerPmacMacroExample". For the typical installation the path should be:

"C:\DeltaTau\Power PMAC IDE\PowerPMACProjectExamples\PowerPmacMacroExample\PowerPmacMacroExample\Documentation\Power PMAC Macro Command Specification 2014-01.pdf"

 

Also in this folder is the "Power PMAC MACRO script" manual. I think both of these manuals will provide the missing documentation.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...