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

Add additional data types support #68

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

SerafinTech
Copy link
Owner

The SHORT_STRING data type is a single byte character string. It is sent with the first byte being the length, followed by the string data. Supporting symbolic (Rockwell) tags with this data type is relatively straightforward. Also add support for USINT (unsigned 8bit data)

There was also a change for writing SINT data, the code used Buffer.writeUInt8 when I think it should have used Buffer.writeInt8.

Further testing should probably be done, as I've only be able to test using the Micro850 simulator in Connected Components Workbench.

Tested with
CCW version 22
PLC - 2080-LC50-48QWB-SIM (Micro850 Simulator, not actual hardware)

greg9504 added 4 commits May 4, 2024 22:45
Add support for USINT and fix typo where write of SINT used valBuf.writeUInt8 instead of valBuf.writeInt8
undo a change I made that I thought was necessary for null strings.  Turns out there are two ways to set a tag value when writing a tag (tag.value = someval or plc.writeTag(someval)). The null check was for the param passed.
@SerafinTech
Copy link
Owner Author

@greg9504 SHORT_STRING is not used in Studio 5000 controllers so I won't be able to test it on actual hardware.

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 this pull request may close these issues.

2 participants