cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

trouble with queryPropertyHistory

MA_10062204
7-Bedrock

trouble with queryPropertyHistory

Hello, i need to get a single value and timestamp from the service, and i have trouble understanding the documentation - as in I can't seem to get it to work.

The properties the service gets are as following:

MA_10062204_0-1688050340468.png

The output should be an infotable containing "timestamp" and "Modbus_Demobox2_kW", which is defined in a datashape.

My main Problem is filtering right -- what do I have to do?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
nmutter
14-Alexandrite
(To:MA_10062204)

I think you are searching the service called "QueryNumberPropertyHistory" where you can pass in the propertyname "Modbus_Demobox2_kW" and maxItems set to "1." and oldestFirst "false"

 

View solution in original post

3 REPLIES 3
nmutter
14-Alexandrite
(To:MA_10062204)

I think you are searching the service called "QueryNumberPropertyHistory" where you can pass in the propertyname "Modbus_Demobox2_kW" and maxItems set to "1." and oldestFirst "false"

 

Well, it worked. It wasn't really what I was asking for, but I made it work. So, thanks I guess

nmutter
14-Alexandrite
(To:MA_10062204)

Maybe I did not understand the question correctly then. I understood you wanted a service which will return "timestamp" and "value" of a property.

 

There is also service GetPropertyValuesVTQ (returns Value Time Quality for ALL properties of the thing), or GetNamedPropertyValuesVTQ where you can specify which properties you want.

I was searching for a GetPropertyVTQ(propertyName) but such a service does not seem to exist. So I thought the proposed solution with maxItems=1 would be easiest.

What were you searching for? Maybe you can add some code and what you would expect it to do so I can better understand.

Top Tags