Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Assigning Motor[x].pMasterEnc in C
#1
In the PowerPMAC IDE 4.4.1.7 bgcplc environment, when assigning the master register address as follows:
pshm->Motor[6].pMasterEnc = pshm->EncTable[12].pEnc;

I get this warning during the build:
...warning : assignment from incompatible pointer type

How can I typecast this address assignment so the warning is avoided, or should I put this assignment in a Command(TS) call?

Thanks,
Geoff.
Reply
#2
Geoff,

I'm not certain about that warning, but I think you might be issuing the wrong code. Typically, pMasterEnc is set as:

Motor[6].pMasterEnc = EncTable[12].a (not pEnc)

So can you try instead to issue:

pshm->Motor[6].pMasterEnc = &(pshm->EncTable[12]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)