Jump to content
OMRON Forums

GetCoordPos() cause Sys.WDTFault=1


Recommended Posts

struct coorddata* csdata;
unsigned inttt=1;
void user_plcc()


Hello there,

I tried to query axis actpos in cplc, using function GetCoordPos(). Axis X/Y/Z were assigned to CS1 and X positon is non-zero. When running this cplc, p0..p2 always stays 0, ending up with background WDT trip Sys.WDTFault=1.Function GetCoordPos() seems to have been got stucked all the time. Anyone knows?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

The GetCoord... API functions are particularly difficult to use. Here is an example bgcplc that puts the position of the X axis motor in coordinate system 1 into P2.


void user_plcc()
struct coorddata MyCoordData[32];
pshm->P[0] = (double) GetCoordDesPos(1, &MyCoordData[0]);

double MyDesPosX;
pshm->P[1] = (double) GetCoordAxisData(2, (char *)"x", &MyCoordData[0], &MyDesPosX);
pshm->P[2] = MyDesPosX;

// One Shot Bgcplc
pshm->UserAlgo.BgCplc[0] = 0;

Link to comment
Share on other sites

  • 3 weeks later...
This topic is now closed to further replies.

  • Create New...