ACC-72EX User Manual
Software setup
82
Turbo PMAC Setup for Using ACC-72EX
All interactions between PMAC and ACC-72EX occur through M-variables. Most of the important
registers which are required are mapped in the suggested M-Variable definition files generated by ACC-
72EX Setup Assistant software. The generated files can be included in the header section of the project
files in PEWIN32PRO2.
Note
If multiple ACC-72EX cards are in the same UMAC rack, the M-
variable macro names will be identical for both files, despite the file
name difference based upon the ACC-72EX base address. Make sure
to add a prefix or suffix to the macro names both in the header file and
definition file in order to distinguish the proper macro names for
different ACC-72EXs. Note that no macro name should be longer
than 32 characters.
There are multiple steps in getting the COMX module working with the network/fieldbus. Some of these
steps are protocol-specific, and it is recommended to follow the requirements based upon each protocol
manual provided by Hilscher.
Initialization PLC
Recall that ACC-72EX requires a reset after each power up, power cycle, $$$ (reset), or $$$*** (factory
default reset). This can be achieved with a startup (or initialization) PLC. Example:
CLOSE
END GAT
DEL GAT
#include "M-VariableDefinition_$6C000.pmc"
#include "M-VariableDefinition_$74000.pmc"
#define CommErrorFlag P1
OPEN PLC 1 CLEAR
DISABLE PLC 2..31
// Disable all other tasks
SCtrl_ulSystemCommandCOS=$55AA55AA
// Reset token for MASTER Unit
HCSC_HSF_RESET=1
// Reset bit, token required for reset to complete
S_SCtrl_ulSystemCommandCOS=$55AA55AA
// Reset token for SLAVE Unit
S_HCSC_HSF_RESET=1
// Reset bit, token required for reset to complete
CommErrorFlag=0
timer = 1000 msec
// Reset Time-out Timer
WHILE (CommErrorFlag=0 AND HCSC_NSF_READY=0) // Wait for reset to complete
IF (timer<0)
// Check for reset timeout
CommErrorFlag = 1
ENDIF
ENDWHILE
IF (CommErrorFlag=0)
//
WHILE (CC0_RCX_COMM_COS_RUN=0 OR S_CC0_RCX_COMM_COS_RUN=0) // wait for comm tasks to
// start on COMX modules
HCCC0_HCF_NETX_COS_ACK = HCCC0_HCF_NETX_COS_ACK ^ 1
// Toggle Communication Channel 0’s Change of State Acknowledge bit in
// order to read the CC0_RCX_COMM_COS_RUN which is a part of Communication
// Channel 0 State Register
S_HCCC0_HCF_NETX_COS_ACK = S_HCCC0_HCF_NETX_COS_ACK ^ 1
ENDWHILE
ENABLE PLC 28
ENABLE PLC 10
ENABLE PLC 11
ENDIF
DISABLE PLC 1
CLOSE