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

MTConnectStreams_1.2 violation of enumeration constraint #21

Open
BASA6850 opened this issue Nov 24, 2023 · 5 comments
Open

MTConnectStreams_1.2 violation of enumeration constraint #21

BASA6850 opened this issue Nov 24, 2023 · 5 comments

Comments

@BASA6850
Copy link

I want to add the value "PROGRAM_STOPPED" for execution events in MTConnectStreams_1.2.
Therefore I added the lines as showed in the attached pics.
MTConnect_Streams_2
MTConnect_Streams_1

After restarting the service I still get this error message:
'PROGRAM_STOPPED' violates enumeration constraint of 'READY INTERRUPTED ACTIVE STOPPED FEED_HOLD UNAVAILABLE'.The element '{urn:mtconnect.org:MTConnectStreams:1.2}Execution' with value 'PROGRAM_STOPPED' failed to parse.'.

How can I solve this problem?

@wsobel
Copy link
Member

wsobel commented Nov 24, 2023

The first problem is you are using version 1.2 of the schema. PROGRAM_STOPPED did not exist in 1.2. It was added in 1.3.

You should be using 2.2 (latest) unless there is a good reason to use a legacy version.

You can set schema version in there Devices.xml file or in the agent.cfg SchemaVersion= configuration variable.

Some more info would also be helpful.

@BASA6850
Copy link
Author

Hello @wsobel,
thank you for your response.

The agent runs on a virtual machine as a Windows service. There we have this configuration file.
agent cfg

In the folder "Schemas" I replaced the 1.2 files with the 2.2 files.
image

I uninstalled the existing Windows service and installed it again. After that I can see the MTConnectStreams_2.2.xsd schema.
image

Should this be enough for replacing schema version?

@wsobel
Copy link
Member

wsobel commented Mar 20, 2024

You can have all the schemas in that directory. The agent will search for a matching schemas using the SchemaVersion in the cfg file or the version in the namespace from the Devices.xml.

When it locates the matching version, it sets the namespace and schema version to the location of the schema files on disk or uses the public https link.

@wsobel
Copy link
Member

wsobel commented Mar 20, 2024

Since I can't see the header, I'm not sure what you're pulling in.

@BASA6850
Copy link
Author

BASA6850 commented Mar 20, 2024

@wsobel
Is this the Devices.xml?
mazak - original.txt
mazak.txt
I replaced 1.2 with 2.2 in the header.
Do I need to install the windows service again? After restarting the service I can not see the changes I made in the mazak file.

If I want to define the schema in the cfg file how do I add the SchemaVersion correctly?

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

No branches or pull requests

2 participants