06-27-2014 06:56 PM
hi .
i want to build a system that scan a 2D area with arduino mega (x-y dimension). system works like that; i enter total x and y lengts ( the edge of area that i want to scan) and the step lengts of x and y. i have 5 sensors. for examle 50 cm x length and 5 cm step length. motor runs for 5cm and stops 10 timesand go a step at +y direction and go -x direction 50 cm at 10 steps and +y direction. this is a loop for me. i wrote a program that controls 2 stepper motor drivers. as you know driver has 3 inputs (enable/disable, forward/back and clock). motors and scanning system works well. and i can read all 5 data from voltage indicator. but i cannot monitor this data at ex table and save it to measurement file. i m working for it many weeks. i want to learn that how can i save data with x-y coordinates. if you help i will be happy.thank you.
Solved! Go to Solution.
06-27-2014 07:51 PM
One possibility is to calculate a running sum of the X and Y positions. In Documents there is a AdafruitV2MotorShieldStepperDriver example. The example zip file contains a X Running Sum.VI and Y Running
sum.VI. You may want to use these two VIs. You could then save the X Running Sum and Y running Sum values along with your sensor data.
hrh1818
06-27-2014 08:04 PM
thanks for your reply, the main problem is saving data of 5 sensor for me. i m going to exaine these .vi's. thanks again.
06-27-2014 09:17 PM
This link address your main problem.
<http://metrology.hut.fi/courses/S-108.3030/LabVIEW%20File%20IO.pdf>
herh1818
06-28-2014 05:08 AM
dear hrh1818, if you download and open my program, you can see the main problem is where to put measurement file.vi, i know how to save data but dynamic data is flowing and i have to save them with coordinates. thanks for your help.
06-28-2014 04:40 PM
A sloppy but simple way to do it, I think, is to simply use the "Write to Spreadsheet File" VI. Build a 1D array with the following elements: X-iteration, Y-iteration, V1, V2, V3, V4, V5. You can use this VI after every "measurement" with "Append to file" set to true.
06-29-2014 04:08 PM
dear nathan,
thanks for your help, now i can save data.i want to ask you another and last question ; i want to draw every sensors 3d graph . i know x and y coordinates and sensor's values. how can i do this. my programs last version is attached. i watched videos but i couldnt do it.
thanks again.
06-29-2014 04:33 PM
Given that you have <x, y, data> points, I think you are referring to a surface plot. You can find the surface plot on the front panel palette: Modern > Graphs > 3D Graphs > Surface
If you have issue trying to get this to work, you should post in the LabVIEW general forums becuase you will get much better support over there for LabVIEW features: http://forums.ni.com/