Jump to content
OMRON Forums

Recommended Posts

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
Posted

In C we also have the functions "floor" and "ceil". Below is a bgcplc 0 I used to test this.

 

void user_plcc()
{

pshm->P[0]=floor(9.3);
pshm->P[1]=floor(9.7);
pshm->P[2]=ceil(9.3);
pshm->P[3]=ceil(9.7);

pshm->UserAlgo.BgCplc[0]=0;
}

 

Just don't use it in CaptCompISR().

Posted

Thank you - I've made it work using "floor" with some logic to adjust the result for negative inputs (as I wanted to round towards zero).

 

Is there an easy way to find a list of C functions that are and are not supported in the Kernel C code?

Guest
This topic is now closed to further replies.

×
×
  • Create New...