02-01-2017 10:57 PM
Hi Matt,
Thanks! That was great! After weeks, I finally manage to obtain the orientation data. I would try explore more on extracting other data as well.
Now the problem is to display it in graph real time since it is a event structure. I managed to get the graph the moment I press the stop button but not during the live streaming. I tried several examples from other sources but no luck. Did your work include in displaying it in graph real time?
By the way, referring to the very first post in this forum. Do you try it with the usb dongle connected to the MyRIO?
02-02-2017 04:05 AM - edited 02-02-2017 04:06 AM
Hi Matt,
For the first question, I have used two methods.
First method: I used waveform chart to display the data. As expected, the data is showing up in the chart during the measurement mode and refreshing every 1000 points. When I stopped the application and set the min X axis to 0, the data left to display was the last 1000 points right before the stop. It seems that the data is replaced every 1000 points. (It appears to be the same as in the matlab version).
Second method: I used waveform graph, the data is transfer and bundle it up, build array. Unlike first method, the data is not showed during the measurement mode but gives a full data display in graph instead, right from beginning till end after the application is stopped.
As for the second question, I would restructure it again to avoid confusion. Did you try before by implementing the program into MyRIO and have the dongle connect to MyRIO directly?
02-02-2017 11:15 AM
Great! I'm glad it worked out!
I did use the single sensor and dongle when I initially wrote the program about a year ago, but have also used multiple sensors as well as the station since then. I am not familiar with MyRIO and have not used it.
For data output, in the graph's options or property nodes, I believe there are ways to tweak the graph's history to display more datapoints during measurement, as well as the size of that moving display window.
I recall trying all the options that you mentioned, and ultimately decided on your second method of storing in an array, then plotting in the waveform graph after the trial. I chose this method because it was very efficient, the realtime graphical plot added more processing load to the interface, and an immediate look at the entire trial data at a glance after the trial, was more informative than looking at the realtime plot. If your goal is to let the subject/patient use the realtime graph as some sort of visual feedback with a time domain element, then the realtime graph might be helpful, but there are several visually effective ways to do that with Labview.
I am curious, what is your project about and what sort of movement or measurement are you looking to quantify?
02-02-2017 08:30 PM
Hi Matt,
I am thinking the same thing! The first method doesn't seem promising. I have decided to switch it to second method.
I am working on hand tremor measurement.
I am currently studying the MyRIO and just learned that MyRIO RTOS is LINUX. It seems that it might not be able to support the Window based structure which is what I am doing now. Too bad that, I do not know whether the window and linux has the same coding structure for xsens.
02-18-2017 08:05 PM
Hi Matt,
I am curious that if you ever use the XsDevice_powerDown?
I tried to turn off the connected sensors automatically using this function by input the device id and device used in variant form into it (it takes variant input), but it gives error indicating incorrect input.
05-18-2017 02:45 PM
Hello, Matt.
I'm trying with no success integrate my MTw Xsens with Labview.
I'm doing all steps that you mentioned and I think that I'm having some troubles with parsing the datapacket for INT32 and creating the callback events.
It is possible that you can post your code or some code example?
06-16-2017 01:56 PM
Due to certain general policies for the company I work for, I am only able to post snapshots of snippets of the code. Hopefully this will be clear and sufficient to help anyone that is starting to try to get streaming data from the Xsens MTws. This is the front end of my code, almost directly translated from the Matlab code that Xsens provided. All this code is doing up to this point, is to create the appropriate variant data flow to detect any sensors in range, sync it with the station/dongle, allow the user to select the appropriate sensor (if you have more than one), and then continue the data stream. Some of the sub vis here are simple functions to correctly stop the sensor (end task), and to create event registration for when data information starts coming from the sensor. Hopefully anyone that comes across this thread will be able to use this information to accelerate the Labview code building process for the MTws.
03-10-2019 03:56 PM
hi
What is the apropriate function to use inside the event loop to get data?
Thank you
04-23-2019 04:09 AM
hello charles,
I am recently working on data acquisition from MTw using LAbview, but what i do not figure out is how to get the data while being in the measurment mode? i do not really get the point of event callback function and data event.
Thank you
04-24-2019 01:58 PM
Answering both your questions:
There are multiple "Xsens_get..." functions you can use to get the sensor data. Something like "Xsens_orientation_data" or "Xsens_Euler_Angles". You can see them from the Methods dropdown.
The event callback is necessary to grab data from the MTw when data is available. You can set it to "on data available" mode for the callback, so the event only runs when there is new data available, which should be typically at the streaming rate.