Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle data for 1394 Read and Write?

Hi,
I am trying to read and write the registers of a IEEE 1394 camera.

I think I figured out what the right addresses are but I am having problem in handling the data.

What is the correct representation of the data from the Quadlets and how can I handle it?

I thought the representation would be U32 as stated by the documentation and I just write my U32 values to the given addresses.

But when I read the values for Gain, Shutter and Brightness I get the right values when I represent it as U16. When I look at the received data in binary representation I can see that there is some data in the second 16 bit which I did not expect to be there.

When I read values like the maximum image size which should return two numbers
and represent the data as binary everything works as expected. I get two U16 numbers stuck together as one U32 number.

When I read values like mode and I would expect to get 5 as value, I actually get in binary 10100000000000000000000000000000 instead of 101 so I have to rotate my data.

Now my questions are:
1. Why is there some data in the second 16 bit of the gain, brightness and shutter quadlets? (There is nothing stated about it in the docs for the camera)

2. How can i set these values (like gain)? Do I have to join the 16 bit values with what ever is in the second half of the quadlet register for not overwriting anything essential?

3. Do I have to rotate my data for writing?

Have a nice day,
Bernie
0 Kudos
Message 1 of 2
(3,113 Views)
Ok,
now I got hold of the specification and everything is clear now.
This strange behaviour is intented ...
0 Kudos
Message 2 of 2
(3,113 Views)