Jump to content
OMRON Forums

Strange negation operator behaviour?


Recommended Posts

The following line in a motion program reports no errors in the IDE but will not download:


Motor[1].HomeVel = -Motor[1].HomeVel;


Is there something wrong with this syntactically?


The error message is (unhelpfully) "Error : ( error #31) invalid parameter number in equation".


The following similar lines work (the last one being how I get around the error):


Motor[1].HomeVel = -100;
Motor[1].HomeVel = -GlobalVar;
Motor[1].HomeVel = -(Motor[1].HomeVel);

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic



The firmware development team says that structures don't have a negation bit, hence we can't use structures in following format:


NOT ACCEPTABLE: P0=-Motor[1].ServoCtrl


but we can do the following, as you have already found out:


ACCEPTABLE: p0=-(Motor[1].ServoCtrl)

ACCEPTABLE: P0=0-Motor[1].ServoCtrl




Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...