Delta Tau Forums
GetCoordPos() cause Sys.WDTFault=1 - Printable Version

+- Delta Tau Forums (http://forums.deltatau.com)
+-- Forum: Delta Tau Data Systems (http://forums.deltatau.com/forumdisplay.php?fid=1)
+--- Forum: Power PMAC (http://forums.deltatau.com/forumdisplay.php?fid=2)
+--- Thread: GetCoordPos() cause Sys.WDTFault=1 (/showthread.php?tid=2923)



GetCoordPos() cause Sys.WDTFault=1 - lovu - 07-04-2019

Code:
struct coorddata* csdata;
unsigned inttt=1;
void user_plcc()
{
    pshm->P[0]=GetCoordPos(inttt,csdata);
    pshm->P[1]++;
    pshm->P[2]=csdata[6].data;
}

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?


RE: GetCoordPos() cause Sys.WDTFault=1 - steve.milici - 07-10-2019

I suspect the function usage is not correct.

Please send me your full project to test at ODT's technical support (ATTN: Steve):
ODT-Support@omron.com


RE: GetCoordPos() cause Sys.WDTFault=1 - Eric Hotchkiss - 07-16-2019

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;
}



RE: GetCoordPos() cause Sys.WDTFault=1 - lovu - 07-31-2019

Oh, got it.
Thank you so much, steve and Eric!


RE: GetCoordPos() cause Sys.WDTFault=1 - lovu - 08-01-2019

B.T.W, function GetCoordDesPos() seems to add very much load to CPU[0], maybe it's better for users to perform axis position read in script environment.