Jump to content
OMRON Forums

Using Macro Ring to read from another Power PMAC


luis.segalla

Recommended Posts

Hi

I'm trying to use macro ring to read the position of a motor from one Power PMAC (slave) to another Power PMAC (master). I can establish comunication between the two controllers, but the data they are sharing it's looking weird.

 

Inside the master's project I'm creating an virtual motor that is used only for reading from the slave's EncTable with the following code:

EncTable[1].type=1 
EncTable[1].pEnc=Gate3[0].MacroInA[0][0].a
EncTable[1].pEnc1=Sys.pushm 
EncTable[1].index1=1 
EncTable[1].index2=1
EncTable[1].index3=0 
EncTable[1].index4=0 
EncTable[1].ScaleFactor=1/65536 

Motor[1].pEnc = EncTable[1].a 
Motor[1].pEnc2 = EncTable[1].a

 

From the slave's project I'm using another virtual motor (for now) and writing what is read from the EncTable in the Macro Channel:

Gate3[0].MacroOutA[0][0] = EncTable[1].pEnc;

 

But when I move the slave motor there are no reads in the master. Can you help me figure out what I'm doing wrong?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Hi Richard!

Thanks for the advice! We've tried it but it didn't work as expected. I also didn't get why you shifted index 1 and 2 13 bits? As MacroIn expects 24 bits words. We're losing information this way, ain't we?

 

I've tried a new approach for the problem. Now we have a real motor connected to the slave Power PMAC this motor has it's own EncTable that reads from the encoder. We also created a virtual motor that read from the same EncTable and do the same bit shits, but sends this information to the output (pDac register) that is connected to the Macro Ring via MacroOut. The code for the EncTable and Motor is as follows:

EncTable[21].type=1 
EncTable[21].pEnc=EncTable[11].PrevEnc.a
EncTable[21].pEnc1=Sys.pushm 
EncTable[21].index1=8 
EncTable[21].index2=8 
EncTable[21].index3=0 
EncTable[21].index4=0
EncTable[21].index5=0
EncTable[21].MaxDelta=0 
EncTable[21].ScaleFactor=1

 

Motor[11].pDac=Gate3[0].MacroOutA[0][0].a
Motor[11].pEnc = EncTable[21].a 
Motor[11].pEnc2 = EncTable[21].a 

 

On the Master side we receive this information in the following EncTable:

EncTable[1].type=1 
EncTable[1].pEnc=Gate3[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].index5 = 0
EncTable[1].ScaleFactor=1/256

 

The problem we're facing right now is that the information is not being sent, the MacroOutA[0][0] register is empty when we check it. But if we force it to send the message by changing "Motor[11].pDac=Sys.pushm" and inputing "Gate3[0].MacroOutA[0][0]=PowerBrick[0].Chan[0].ServoCapt" in the terminal the information gets to the master. I don't want to use a PLC or Subprogram to keep sending this info. There is any way I can send it thorugh the pDac register or any other register like it?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...