08-04-2011 05:52 AM
Hey everyone,
I'm trying to construct a vi to read from multiple atomic IMUs for an aerospace university project.
I've got the vi which is attached to the bottom of this code.
Now, the imu is set up using BR@Y terminal so I know that it's sending the data and when I go into the Instrument I/O assistant and press the 'read and parse' tab then the individual readings come out as I expect them. The device is connected through USB and when looking at the individual readings (count, accel x etc) it comes out fine.
My problem is that I don't understand how to get all of the data from there to running continuously so that I can plot all of the accelerations on one graph and all the rates on another graph. I have the two graphs and my issue is that firstly I cannot attach the waveform graphs to any of the readings.
Furthermore, when I press 'Run' the program returns the error:
Error -1073807246 occurred at Property Node (arg 1) in IMU Reading.vi:Instance:0->IMU Reading.vi
Is this because of a timeout? I can;t understand it since if I run the program in the Instrument I/O assistant then it works well and gives me the data I am looking for.
I'm not using DAQ since my device has no drivers and works fine over USB.
To summarise, I want the program to take the data coming in over the USB (as correctly parsed by the Instrument I/O assistant) then plot the £3 accelerations v count" on one graph and the "3 body rates v count" on another graph.
The next step is to get the program to write all of the data to a file but that is for another day I feel... :s
Any help would be very much appreciated.
Aryeh
08-04-2011 09:59 AM
Dear rubberhedgehog
I recomend you to use the Instrument I/O assistant because I don´t think that you could find any drives for your atomic IMUs for labview.
Without the knowledge of the not functioning code it is not easy to find out what causes the error.
If your code is working like posted try to look on the XY Multi Plot.vi in Help>Find Examples. It should help you to resolve your problem with the graph plotting.
The problem in your code is also that you have a graph which shows all the available data only once, and you enter only one element in every loop. That is why you would need to use a chart which remembers the previous data and add the new data to the plot. In your case you need to use XY graph to be able to show the count on one axis and i.e. the acceleration on the other. If it is enough for you to have only the final data and not see the graph during the measurement you only need to put the XY graph out of the while loop and create an array from all measured data. Beter would be to use a shift register whit an updating array and show the whole array in every loop on the graph. You could remember all elements in the shift register and in every loop ad new items to the array.
I hope to help
08-04-2011 11:40 AM
Thanks for that reply.
I am using the Instrument I/O assistant because there are no drivers for my hardware.
After going through the examples I am having still further issues - the blocks will not attach to a chart since it claims that the data are different types even though it says they are both 1D arrays! This is shown in the first attachment to this message.
I've changed the graphs to charts and still no luck ![]()
Going back to the original version though, the error is 1073807246
The resource is valid, but VISA cannot currently access it.
Does this mean that the buffer is being blocked by the incoming data?
Thanks again
08-05-2011 02:21 AM
Dear rubberhedgehog
Try the Vi attached. I will also try to find out how to wire a working graph in the while loop so you would see the graph continuously updating because now it is only showing you results after stoping.
08-05-2011 03:27 AM
Hi
I am posting a picture how to do the continuous multiplot.
Hope it will help
08-05-2011 03:54 AM
Hi
For resolving the error try the link http://forums.ni.com/t5/LabVIEW/error-1073807246/m-p/507424
08-08-2011 08:37 AM
Thanks for that help.
I'm still stuck with the program not wanting to run because of the same error - following that link just made the program lock up :s
I believe that there is a conflict on the COM port and LabView can't access it properly and so is producing this fault.
This is SO frustrating! I can grab single snapshot views of the accelerometer data, but not continuous readings
08-08-2011 10:51 AM
The error means another program/resource is also using the same com port.
08-09-2011 03:29 AM
Hi
If you tried to close your comunication with a VISA Close in serial to the Instrumkent I/O Assistant to ensure that you are not creating a conection and closing it at the same time in a while loop, what could cause your program to look up. Than you can try to comunicate with the Atomic IMU on lower level using VISA. Try modifying an example (Advanced Serial Write and Read.vi in Example finder).
I hope it will help
08-09-2011 04:25 AM
The program as it stands is a development of the Advanced Write and Read.vi example provided with the software. This is why I am so confused as to why it will not work properly. Surely these examples are supposed to be starting steps to help users get to grips?
I've got no other software using the COM port - my setup involves initialising the device using br@y terminal just to check that data is being sent to the computer (the device sometimes resets after being switched off and goes into sleep mode).
Then I go through a manual step to see that LabView is receiving the data by going through the I/O Assistant and pressuing 'read' once on the read and parse tab and it gives one reading which is correct.
When going to run it from the main screen and plot the values the program suddenly doesn't like it and comes up with an error that another device is using the port?!