Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetCoordPos() cause Sys.WDTFault=1
#3
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.

Code:
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;
}
Reply


Messages In This Thread
GetCoordPos() cause Sys.WDTFault=1 - lovu - 07-04-2019, 07:56 AM
RE: GetCoordPos() cause Sys.WDTFault=1 - Eric Hotchkiss - 07-16-2019, 11:01 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)