MGS1600GY Reading Gyro Data

3 months 2 weeks ago - 3 months 2 weeks ago #29535754 by EVK
 
Hi,

Can anyone describe me what kind of message structure should I use to read gyroscope data from MGS1600GY using the API? And how to read left and right markers separately?

In the datasheet of the sensor, page 14 Table 5, I have seen that I need to use the command GY (for Microbasic) with preferably an argument. In order to find out what the register address is, I have checked the Modbus Implementation Manual and found out that the Modbus ID of GY is 0x2620 (on the page 13). So, I added 1 to 0x2620 (this is recommended in the Modbus Implementation Manual) and tried to read 0x2621. I get some values, see that the values change when I rotate the sensor, but the values don't make sense. I also tried to read MGY, the Modbus ID of which is 0x2420 (+1 = 0x2421), the result is the same (page 14). Then, I checked the data sheet again, and found out that the resolution is 14 bits (page 19, Table 16), so I separated 14 bits starting from the least significant bit, yet still, the values don't make any sense. How can I read gyroscope data (especially the Z axis, the yaw)? These are the messages I send to sensor to read gyroscope data; :010426210002<LRC value><CRLF> and :010424210002<LRC><CRLF>.

Another issue is that I don't know how to read the status of left and right markers separately? I read the MGM register (datasheet, page 14, table 5), the Modbus ID of which is 0x23E0 (+1 = 0x23E1) (Modbus Implementation Manual, page 13),  and detect the existence of a marker. But I don't know how to distinguish the left and right markers when they are both present. What kind of message should I send to the sensor and what kind of response should I expect?

I should state that the manuals are not informative enough to use the sensor with a custom API. There are a lot of gaps, which pushes me to check different documents back and forth. I would be happy if you could update them so that they can be used with a custom API.

Looking forward to hearing your replies,
 

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.072 seconds