01-03-2018 06:13 AM - edited 01-03-2018 06:14 AM
Hello!
I`m working on my degree and I need to get the angles from IMU device. I`ve done probably most of work but I have a problem.
My IMU device has some problems with sending data and sometimes (like one for three times) I don`t get the full frame of data. That`s why I would like to store all of my data which I get from device and then find the last one which is diffrent than 0 value and then use it. Can you give me some advices how to do it?
Best regards
Tomasz
01-03-2018 06:22 AM
Hi Tomasz,
My IMU device has some problems with sending data and sometimes (like one for three times) I don`t get the full frame of data.
Advice: try to improve the communication channel/method to minimize data losses…
That`s why I would like to store all of my data which I get from device and then find the last one which is diffrent than 0 value and then use it.
Only update your internal buffer when the received data is unequal to zero…
Can you share your VI?
Which communication method do you use?
How do you store your data internally?
01-03-2018 07:35 AM
@siwymurzyn wrote:
My IMU device has some problems with sending data and sometimes (like one for three times) I don`t get the full frame of data.
My initial thought here is that you are using a serial port and using the Bytes At Port to read your data, which will just lead to major issues similar to what you describe here. Please give more information and perhaps we can fix this issue instead of doing the work around. What exactly is the instrument? How are you reading the data? Code usually helps a lot.
01-03-2018 07:56 AM
Have you read the manual for that device?
Oh, We can help you translate the information in the manual to functional code AND are usually happy to do so, HOWEVER.
"IMU" is rather vague. Even if I've guessed correctly that you mean an "Inertial Measurement Unit" we can't possibly read the manual without some specifics like...
If it is a Telepathic interface your hardware is faulty because we don't know that it is a telepathic interface.
01-03-2018 10:26 AM
So, it`s hard to explain you everything but i`ll do my best.
I`m getting frames via bluetooth device and then via serial port. There is 3 imu drivers.
I probably solved my problems using shift register and getting few frames in concecrated string and then reading it. This is a ss of my program.
I don`t know why but no matter what i do sometimes i got some kind o tick which take '0' value as you see on the graph. But today my teacher said that is probably a problem of a device.
I will probably leave it like this. But now i need to do some kind of 3d graph which should look same as my project. This is a photo:
So it`s a normal 'robotic arm' which i can move using my hands. Have you got any idea is there any possibility to project something like this in labview? I have angles only, but i can easily get rotation matrix, euler angles etc. Hope you understand my not good english.
01-03-2018 10:37 AM
1. You only need to configure your serial port once. Move that to be before your loop.
2. Your Bytes At Port is likely causing your issues. Again, tell us what the device sending you the data is. Or tell us the format of the data it is sending. There is some protocol that it is using that you can use to get your full packets and no more or less. This would also eliminate the need for all of those shift registers you are maintaining.
3. You would benefit greatly by learning to use arrays and FOR loops. 90% of that code could be eliminated and make the program a lot more scalable.