Omron Forums Support Posted February 10, 2012 Share Posted February 10, 2012 Below are the default feedback, command, and flag settings for a controlling a motor (motor 1 for this example) over MACRO using ACC-5E3 (at card index 0) in a UMAC rack: // ---- Motor Structures ---- // Motor[1].pEncCtrl=Acc5E3[0].MacroOutA[0][3].a Motor[1].pDac=Acc5E3[0].MacroOutA[0][0].a Motor[1].pEncStatus=Acc5E3[0].MacroInA[0][3].a Motor[1].pAmpEnable=Acc5E3[0].MacroOutA[0][3].a Motor[1].pAmpFault=Acc5E3[0].MacroInA[0][3].a Motor[1].pLimits=Acc5E3[0].MacroInA[0][3].a Motor[1].pCaptFlag=Acc5E3[0].MacroInA[0][3].a Motor[1].pPhaseEnc=Acc5E3[0].MacroInA[0][0].a Motor[1].pAdc=Acc5E3[0].MacroInA[0][1].a Motor[1].pEnc=EncTable[1].a Motor[1].pEnc2=EncTable[1].a Motor[1].LimitBits=25 Motor[1].CaptPosRound=1 Motor[1].CaptPosRightShift=0 Motor[1].CaptPosLeftShift=13 Motor[1].CaptFlagBit=19 Motor[1].AmpFaultBit=23 Motor[1].AmpEnableBit=22 Motor[1].AmpFaultLevel=0 Motor[1].EncType=4 // ----- Encoder Conversion Table Entries ----- // EncTable[1].type=1 EncTable[1].pEnc=Acc5E3[0].MacroInA[0][0].a EncTable[1].pEnc1=Sys.pushm EncTable[1].index1=8 EncTable[1].index2=8 EncTable[1].index3=0 EncTable[1].index4=0 EncTable[1].ScaleFactor=1/exp2(13) The other structures remain default. Note that I did not modify structures for commutation, such as Motor[1].PhasePosSf, Motor[1].PwmSf, I2T settings, and so forth, because this will vary depending on the type of motor and drive used. Of course you would have needed to enable the servo node (node 0) for this motor beforehand. Taking from Sina's example on the ACC-14M's thread, we can set up a single node (Node 0): Sys.WpKey=$AAAAAAAA; // Assuming your ACC-5E3 has two DspGate3 chips // You have to setup all the clocks on slave Gates first Acc5E3[1].PhaseFreq = 8000; Acc5E3[1].ServoClockDiv=1; Acc5E3[1].PhaseClockDiv=0; Acc5E3[1].PhaseClockMult=0; // Setup the clock on master Gate Acc5E3[0].PhaseFreq = 8000; Acc5E3[0].ServoClockDiv=1; Acc5E3[0].PhaseClockDiv=0; Acc5E3[0].PhaseClockMult=0; Sys.ServoPeriod = 0.25; Sys.PhaseOverServoPeriod=0.5; Acc5E3[0].MacroModeA=$403000; Acc5E3[0].MacroModeB=$1000; Acc5E3[1].MacroModeA=$1000; Acc5E3[1].MacroModeB=$1000; Acc5E3[0].MacroEnableA=$0FC00100 Acc5E3[0].MacroEnableB=$1F800000 Acc5E3[1].MacroEnableA=$2F800000 Acc5E3[1].MacroEnableB=$3F800000 Sys.WpKey=$0; In order to use other motors, you would have to change the addressing of the motor structures and the Encoder Conversion Table structures to the new motor's node accordingly. For example, using motor 2 on node 1: // ---- Motor Structures ---- // Motor[2].pEncCtrl=Acc5E3[0].MacroOutA[1][3].a Motor[2].pDac=Acc5E3[0].MacroOutA[1][0].a Motor[2].pEncStatus=Acc5E3[0].MacroInA[1][3].a Motor[2].pAmpEnable=Acc5E3[0].MacroOutA[1][3].a Motor[2].pAmpFault=Acc5E3[0].MacroInA[1][3].a Motor[2].pLimits=Acc5E3[0].MacroInA[1][3].a Motor[2].pCaptFlag=Acc5E3[0].MacroInA[1][3].a Motor[2].pPhaseEnc=Acc5E3[0].MacroInA[1][0].a Motor[2].pAdc=Acc5E3[0].MacroInA[1][1].a Motor[2].pEnc=EncTable[2].a Motor[2].pEnc2=EncTable[2].a Motor[2].LimitBits=25 Motor[2].CaptPosRound=1 Motor[2].CaptPosRightShift=0 Motor[2].CaptPosLeftShift=13 Motor[2].CaptFlagBit=19 Motor[2].AmpFaultBit=23 Motor[2].AmpEnableBit=22 Motor[2].AmpFaultLevel=0 Motor[2].EncType=4 // ----- Encoder Conversion Table Entries ----- // EncTable[2].type=1 EncTable[2].pEnc=Acc5E3[0].MacroInA[1][0].a EncTable[2].pEnc1=Sys.pushm EncTable[2].index1=8 EncTable[2].index2=8 EncTable[2].index3=0 EncTable[2].index4=0 EncTable[2].ScaleFactor=1/exp2(13) And of course you would then need to activate Node 1 by changing Acc5E3[0].MacroEnableA: Acc5E3[0].MacroEnableA=$0FC00300 Link to comment Share on other sites More sharing options...
andyf Posted February 16, 2012 Share Posted February 16, 2012 Thanks for this post. Everything here matches what I've done for a single motor (node 0). Now I'd like to understand how to get the ring communication to work... I have a single Copley Xenus XML connected to the ACC5E3 via optical cables. I am trying to follow the other post (where you helped Lei), but I am not having any luck. If I understand correctly, the ACC5E3 is considered station 0 (a master station), and the Copley is considered station 1 (a slave station). Question: Is the ACC5E3 considered station 0 because it contains the synchronizing master? Are station numbers then just sequential with each device in the ring after station 0? The Copley is setup to use master address 0 (SW1=0). I also left the slave address as 0 (SW2=0), since I believe this is the node number. OK, so I should be able to connect to station 1, and set its MIXXX registers correct? But when I try to do that I get: STN=1 stdin:161:4: error #57: MACRO SYNC MASTER STN=0: STN=1 I also noticed that there are ring errors detected: Macro.Station=0 Macro.Rings=1 Macro.RingTest[0].PwrOnErrCntr=3 Macro.RingBreakStationNum=0 Help... Link to comment Share on other sites More sharing options...
Omron Forums Support Posted February 17, 2012 Author Share Posted February 17, 2012 Masters do not have a "Station Number" per se; that really pertains only to Slave stations. Regarding your Copley Xenus XML drive, according to page 5 of the drive's manual (attached to this post for your convenience), S1's (rotary switch) setting determines which Master IC # your Slave should use. This depends on what Master IC # your ACC-5E3, the Master, is set as, determined by ACC-5E3's SW1 setting. The S2 rotary switch's setting on the Copley drive determines which node to use for this Slave station. This is independent of the Station Number you assign to this drive, but typically you increment the station number as you increment the node number. You should only set S2 to the following values, which correspond directly to the servo node # that this Slave station will then use: 0,1,4,5,8,9,12, & 13. E.g. if S2=0, this Slave station will use Node 0 for its servo node, regardless of the station number. However, I believe that even after setting the node number to use through switch S2, you still need to set up the node in software on the Copley drive. You can do this by first connecting to the drive over Macro ASCII. Before the Slave has been initialized, it will by default be at MACRO Station #255. 1. Within the IDE, in the Terminal Window, type MacroStation255. 2. Type I11=n in order to assign this Slave to Station #n. Note: The Slave must be assigned to any unused Station Number (e.g. I11=1 to assign the Slave to Station #1). If a Macro I/O error is received, make sure Gate3.MacroEnableA and Gate3.MacroModeA are set correctly. Also make sure that the unit has not been assigned a Station number already. If the Station has already been assigned a station number, there are two options: a) Find out the station number n and enter MacroStationN, where N is the station number, to initiate MACRO ASCII communication with the Station. b) Reset the station number of all the stations by entering MacroStation0 and then enter I11=0. 3. Type MacroStationClose to exit MACRO ASCII Mode. 4. Type MacroStationN where N is the Station Number assigned in step 2 (e.g. MacroStation1 to open ASCII communication with Station #1). 5. Assign the node and master number with MI996. For example, to assign the station to Node 0 on Master IC #0 on the Slave, type: I996=$FC001 6. Type MacroStationClose to exit MACRO ASCII Mode. 8. Enable the same node number on the Master. For example, to enable Node 0 on Master IC #0 on the Master, type: Gate3[0].MacroEnableA=$FC00100 Now you should be able to talk to the Copley. Does that fully answer your concerns?xmlDS.pdf Link to comment Share on other sites More sharing options...
Recommended Posts