Jump to content
OMRON Forums

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Posted

To add on a tiny bit--

 

While it is allowed, it is generally considered bad practice to have short words like that (reset, status, etc.) as #defines or variable names.

Any string which is either a command or part of a command (for instance, a variable named "AbsPos" would be considered part of Motor[x].AbsPosSf) should be avoided.

A better option would be to name your parameter "ResetVar" if it is a variable or "_reset" if it is not.

This way it is similar, but unique.

Posted
On 11/20/2023 at 6:25 PM, Alex Anikstein said:

To add on a tiny bit--

 

While it is allowed, it is generally considered bad practice to have short words like that (reset, status, etc.) as #defines or variable names.

Any string which is either a command or part of a command (for instance, a variable named "AbsPos" would be considered part of Motor[x].AbsPosSf) should be avoided.

A better option would be to name your parameter "ResetVar" if it is a variable or "_reset" if it is not.

This way it is similar, but unique.

Thanks for the comments. It turned out that I named a PLC "reset", and this PLC was assigned an ID of 3 by the IDE.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...