Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TwinCAT does not currently allow '$' in a pragma #132

Closed
klauer opened this issue Nov 21, 2019 · 4 comments · Fixed by #135
Closed

TwinCAT does not currently allow '$' in a pragma #132

klauer opened this issue Nov 21, 2019 · 4 comments · Fixed by #135

Comments

@klauer
Copy link
Contributor

klauer commented Nov 21, 2019

With $ in the pragma, the entire pragma is ignored and not included in the .tmc.

  • pytmc pragmalint should catch this and warn
  • An alternative to macro substitution strings should be proposed. Could we replace %() in values with $() for example? (cc @n-wbrown @ZLLentz)
  • Should report this to Beckhoff as well
@ZLLentz
Copy link
Member

ZLLentz commented Nov 21, 2019

I don't have a preference for replacement symbols. Percent is fine

@n-wbrown
Copy link
Contributor

n-wbrown commented Nov 21, 2019

There's a possibility this could conflict with the way arrays of objects are formatted if we're using the % symbol to specify how the array's index will be formatted in the PV name. Either way it's probably good practice to allow us to change exactly which symbol we use for this at a later date. #, @, &. and ^ could be good replacements if we need them. Maybe we start with one of the other symbols so if Beckhoff hasn't patched the $ rejection by the time we need it ('it' being the % symbol), we don't have to create a second interim convention.

@klauer
Copy link
Contributor Author

klauer commented Nov 21, 2019

Good point, @n-wbrown, I think we probably should avoid % for your stated reason...

@klauer
Copy link
Contributor Author

klauer commented Nov 27, 2019

#135 will close this, using @ as the alternate character for pv: strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants