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

Node values are not updated #433

Open
3 of 5 tasks
eli-osherovich opened this issue Oct 7, 2023 · 15 comments
Open
3 of 5 tasks

Node values are not updated #433

eli-osherovich opened this issue Oct 7, 2023 · 15 comments

Comments

@eli-osherovich
Copy link

Describe the Issue
I trying to get temperature from a camera every X seconds. However, I always get the same value (that was correct at the moment of the connection to the camera) despite the fact that the temperature changes all the time.

To Reproduce
Try to read a dynamic node such as temperature and see if the values are indeed different.

Sample Code

with Harvester() as h:
 ...
 ia = h.create()
 white True:
   print(ia.remote_device.node_map.get_node("Temperature_Sensor").value)
   # it will always print the same value, even though the true value (temperature) changes.
  • Yes
  • No

If yes, please provide a sample code:
See above.

Expected Behavior
I would expect to see the value changes, however, it is kept "frozen". Namely, all the prints above will print the same temperature (correct only on the first reading).

Screenshots
NA.

Configuration

  • OS: Ubuntu 22.04
  • Python: 3.8
  • Harvester: 1.4.2
  • GenTL Producer: MATRIX VISION GmbH
  • Camera: Specim FX17

Reproducibility

This phenomenon can be stably reproduced:

  • Yes
  • No.

If applicable, please provide your observation about the reproducibility.

Actions You Have Taken

Additional context
NA

@jcormier
Copy link
Contributor

jcormier commented Oct 9, 2023

Note this is very likely a problem with the producer you are using or more likely the XML file coming from your camera. In the xml if they set this field to cacheable, then you'd get this behavior.

@eli-osherovich
Copy link
Author

Thanks, @jcormier. Not familiar enough with the GIgE standard... Can I edit the xml and upload it back?

@jcormier
Copy link
Contributor

jcormier commented Oct 9, 2023

I'm not sure, that would be camera-dependent. I think you should get ahold of whoever makes the Specim FX17.

@thiesmoeller
Copy link

Typical for camera implementations, that have values that change slowly like temperature to rely on poll infrastructure of genicam.

please try in your loop every second this call

ia.remote_device.node_map.poll(1000)

this will invalidate the cache on every node, that has a polling time set ( typically Temperature )

Subsequent reads will get the value from the camera directly.

The reason behind this design is to prevent constant updating in GUI Tools, that would generate a significant read rate to the camera otherwise, if the Temperature node would be a volatile uncached node.

@jcormier
Copy link
Contributor

jcormier commented Oct 9, 2023

please try in your loop every second this call

ia.remote_device.node_map.poll(1000)

Wow, this is really good to know. The PollingTime is mentioned in the GenICam standard but it mentions it's implementation is optional and provides no info on how its supposed to be used. I assume poll is expected to get called by some timer every 1000ms, or whatever time you pass it.

@eli-osherovich
Copy link
Author

Thanks, @thiesmoeller !

@eli-osherovich
Copy link
Author

@thiesmoeller I might be doing something wrong, but poll does not help...

@MYCL94
Copy link

MYCL94 commented Jan 19, 2024

@eli-osherovich Same for me, polling doesn't help. I am still searching for a good way since only restarting the app seems to help but I couldn't figure out which method-call leads to updating the nodes.

@jcormier
Copy link
Contributor

Can you post the cameras xml? If the camera has set its caching rules wrong then polling won't help.

@MYCL94
Copy link

MYCL94 commented Jan 22, 2024

Hi @jcormier, thanks for helping me out.

There are two cameras connected, and both deliver images.
But for some reason it is not possible to change settings for TIS camera. Maybe it due to the fact that I am using the .cti file of Baumer. Ans also for both it is not possible to read the actual value out of the node.

As requested the XML-File
TIS camera XML (not even able to set parameter like Gain etc.):
TIS_IMX250_M.json

Baumer camera XML (Possible to apply settings like Gain etc,):
Baumer_CXG_IP_PTP.json

@jcormier
Copy link
Contributor

But for some reason it is not possible to change settings for TIS camera. Maybe it due to the fact that I am using the .cti file of Baumer. And also for both it is not possible to read the actual value out of the node.

Feels like you should create a separate issue. If writes aren't working then I don't see how that would be related to caching. Though honestly, you should be contacting the camera manufacturer first, I doubt this is an issue with Harvesters.

@MYCL94
Copy link

MYCL94 commented Jan 22, 2024

OK, but shouldn't the Baumer camera work as expected then? I don't see both cameras having troubles, since I can change them by the provided software. Imho this is definetly an Harvesters issue. Is there any way to find an CTI-file which has maximum coverage? Shouldn't this be listed somewhere?

@jcormier
Copy link
Contributor

jcormier commented Jan 22, 2024

shouldn't the Baumer camera work as expected then

Are you saying it doesn't work? In the two posts you've made so far, its implied if not explicitly stated the Baumer camera works. So I'm lost.

I can change them by the provided software

This is new information that would be very helpful to anyone trying to help you. What cti does the provided software use?

Is there any way to find an CTI-file which has maximum coverage? Shouldn't this be listed somewhere?

There is? https://harvesters.readthedocs.io/en/latest/INSTALL.html#installing-a-gentl-producer

You should create a new issue outlining all your testing, in order to have any chance of getting useful help. I need to get off the internet for today, I'm clearly too grumpy.

@MYCL94
Copy link

MYCL94 commented Jan 22, 2024

Ok @jcormier, thanks for you reply. I will create an issue with listed infos and all the testing so far as you suggested.
n8

@eli-osherovich
Copy link
Author

eli-osherovich commented Feb 22, 2024

Can you post the cameras xml? If the camera has set its caching rules wrong then polling won't help.
@jcormier
I wish :)) #438

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

4 participants