LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

transform desktop VI to ARM VI

Hi,

I'm using a microstrain IMU. It works correctly with Desktop using VISA VI.

I'd like to transform this communication to ARM platform.

Is this the right way to do this?

Thanks

0 Kudos
Message 1 of 13
(7,789 Views)

Looks like you handled switching to Serial Compatibility VIs.
Also, you managed to change commands in example provided by MicroStrain.

 

Don't understand very well what kind of help you are expecting. However, I would make some changes here:
1. There is no need to open/close the serial port each time you want new data (but you should follow the stream looking for headers)

2. The type cluster is too complex, and after the type cast you have unnecessary processing
Probably a 12 elements cluster is more appropriate (Header, M11, M12, etc) and wire the Type Cast output directly to an indicator (of course DCM2ANG.vi needs modification as well)
3. You should check if the packet is valid
4. Use always atan2 to make conversion to Euler (DCM2ANG.vi)
5. Analyse if a specific kind of Euler angles is needed (Tait-Bryan). 3DM calculates Euler angles and rates (0xCE or 0xCF messages). By using these you will avoid further processing in your microcontroller (distributed processing). Alternatively, analyze if the algorithm is not faster if you use directly orientation matrix or quaternion.

Message Edited by NicB on 10-07-2009 07:04 AM
0 Kudos
Message 2 of 13
(7,778 Views)

 


5. Analyse if a specific kind of Euler angles is needed (Tait-Bryan). 3DM calculates Euler angles and rates (0xCE or 0xCF messages). By using these you will avoid further processing in your microcontroller (distributed processing). Alternatively, analyze if the algorithm is not faster if you use directly orientation matrix or quaternion.

 

It's a goog idea. this is what I did before however my vI was very complicated:

imu.png

 

I don't andestand how in the microstrain example, they did to extract angular rate from the stream. just by naming the cluster "Angular Rate Vector"?

imu2.png

0 Kudos
Message 3 of 13
(7,764 Views)
How to extract the Euler Angles?
0 Kudos
Message 4 of 13
(7,763 Views)

neil84 wrote:

 


5. Analyse if a specific kind of Euler angles is needed (Tait-Bryan). 3DM calculates Euler angles and rates (0xCE or 0xCF messages). By using these you will avoid further processing in your microcontroller (distributed processing). Alternatively, analyze if the algorithm is not faster if you use directly orientation matrix or quaternion.
0 Kudos
Message 5 of 13
(7,745 Views)
I know that this message allow acquiring Euler an rate, butr I don't anderstant how is consructed the cluster to define what message to extract (matrix, Euler, rate, quaterion...)
0 Kudos
Message 6 of 13
(7,739 Views)

You have to do something like this:

 

get Euler Angles.PNG

 

Only Euler Angles are extracted here but you can extend to any message.

0 Kudos
Message 7 of 13
(7,724 Views)

Hi Nic,

tahnk you for explaination.

Is this the right way to do that?

 

0 Kudos
Message 8 of 13
(7,710 Views)
Have you tried the previous snippet?
It contains more info than explanations.
You're always using clusters and arrays. Those embedded microcontrollers have limited memory. Do not waste it.

0 Kudos
Message 9 of 13
(7,706 Views)

I didn't noticed that it was a snippet.

In this snippet you are handeling Integer Array. I don't understand how do you do to acquire serial data. using "Byte Array To String" VI?

0 Kudos
Message 10 of 13
(7,701 Views)