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

SAMPLE cannot be represented as a DATA_SET #500

Closed
robot-ranger opened this issue Nov 24, 2024 · 4 comments · Fixed by #501
Closed

SAMPLE cannot be represented as a DATA_SET #500

robot-ranger opened this issue Nov 24, 2024 · 4 comments · Fixed by #501

Comments

@robot-ranger
Copy link
Contributor

robot-ranger commented Nov 24, 2024

I was expecting to be able to represent a sample as a dataset, but the agent complains about not being able to convert to a double:

SHDR:

[11]: DATAITEMS SHDR: 2024-11-24T00:10:16.033491Z|mxi_m001_target_q|j0=-105.939 j1=-64.723 j2=-129.918 j3=-90.387 j4=128.378 j5=-21.754

Agent log:

2024-11-24T00:10:16.879811Z (0x0000007fa7fff000) [warning] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->DataItemMapper.ShdrTokenMapper.operator->DataItemMapper.ShdrTokenMapper.mapTokensToDataItem->zipProperties: Cannot convert value for data item id 'mxi_m001_target_q': j0=-105.939 j1=-64.723 j2=-129.918 j3=-90.387 j4=128.378 j5=-21.754 - (VALUE): cannot convert string 'j0=-105.939 j1=-64.723 j2=-129.918 j3=-90.387 j4=128.378 j5=-21.754' to double

device.xml:

<?xml version="1.0" encoding="UTF-8"?>
<MTConnectDevices
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="urn:mtconnect.org:MTConnectDevices:2.3"
  xsi:schemaLocation="urn:mtconnect.org:MTConnectDevices:2.3 https://schemas.mtconnect.org/schemas/MTConnectDevices_2.3.xsd">
	<Header deviceModelChangeTime="2022-06-17T16:33:21.188094Z" creationTime="2013-04-02T03:40:04Z" assetBufferSize="1024" sender="localhost" assetCount="0" version="2.3" instanceId="1" bufferSize="131072"/>
	<Devices>
		<Device name="machine_1" id="mxi_m001" uuid="mxi_m001">
			<DataItems>
				<DataItem id="mxi_m001_target_q" name="target_q" type="ANGLE" representation="DATA_SET" category="SAMPLE" subType="COMMANDED"/>
			</DataItems>
		</Device>
	</Devices>
</MTConnectDevices>

the use case here is a digital twin of a 6-axis robot. the joint angles are provided from the robot.

It seems to work if i change category="EVENT" instead of SAMPLE. technically type="ANGLE" is not an EVENT, but the agent doesnt seem to care about that?

Is there a better way to model this?

@wsobel
Copy link
Member

wsobel commented Nov 24, 2024 via email

@robot-ranger
Copy link
Contributor Author

what is the functional or parsing difference between a sample and an event? or are they truely just 'categories'?

@wsobel
Copy link
Member

wsobel commented Nov 24, 2024 via email

@wsobel wsobel linked a pull request Nov 25, 2024 that will close this issue
@robot-ranger
Copy link
Contributor Author

SAMPLE as DATA_SET Works great now! 👍

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.

2 participants