05-05-2016 04:57 AM
Dear Friends
With help of Nathan I make a program to control 2 stepper motors (xy)
As I need a to measure profiles from ground with a distance laser, I need a movement in yy and xx.
My solution was arduino + shield + LIFA.
The code was a flat sequence of 1 move yy + 1 move xx + back yy + 1 mov xx inside a for loop and it repeats the times that wath I want
The 1st problem was to putting the software showing the stepers to go now I can see the countdown of the stepper in yy and in xx.and then reading analog A0 from the laser readings
https://decibel.ni.com/content/thread/46259
My problem now is how to save the steppers into a file. I put the write to measurement file.vi e many places but dont receives de values.
Can somebody help me to finish this program in attach?
Many thanks
cpalka
05-05-2016 07:41 PM
The flat sequence structure serves absolutely no purpose in your VI. You should right click on it and select "Remove Sequence". Once you have done that, attempt to do what you want to do. If it doesn't work then you should attach the VI (with the code that you tried) and explain thuroughly what you are trying to acheive (writing something to a measurement file doesn't make sense in this VI, IMO).
05-06-2016 09:00 AM
Dear Nathan
You are right the flat sequence does nothing, but I start with it to get stepper counts.
Now the small loops make the count good.
- I add a analog read from laser, but the precision seems poor (10 bits arduino). If it works there should be finished.
- I add calibration factors from stepper to mm
- Now I need to add another board (NI USB6009) to read the laser, I will need another loop for that and how can joint laser reading, and stepers counts in same file?
I attach last version (A0 from arduino for laser) and this version saves all profiles in 1 way in a file and comeback profiles in other file, but is it is possible I would prefer putting all dat in a file only.
A picture from the table, laser and 2 files with 2 profiles inside each
Many thanks to keep help me
best regards
cpalka