09-21-2016 06:37 AM
Hello Labview Community,
I am back with my rookie questions.
I have to develop a plate consisting of screws. Under the plate there will be in total 3 motors with the help of which i can loose or tight a screw . For the postioning of screwdriver, i am using linear actuators along x and y axis and they have a 0 point (refrence point at one end). I am using the motors and controllers from Nanotec alongwith their controllers. I can control all the motors with the help of USB cable using a VISA bridge. Till now i am able to control the motors and position them by giving the coordinates manually. Now i want to automate the process and that where it gets hard for me. The screw plate has 300 screws need to be positioned.
What i want: i want to take the coordinates x, y, z from an external excel sheet and and sequence the motors so that they can 1 by 1 loose or tight the screws as needed. X and Y motor take the coordinate from excel and move to first screw, then a pause of 100ms and then z motor use the coordinate and move the screw, when this is finished, x and y motors take the coordinate of second screw and move to that position and so on till the complete 300 screws are in the required position.
Just to keep things simple and in control i have started only with x and y motors. As written above i can give the cordinates manually but how to do that in automated matter. I dont find any good example. It would be nice if somebody could push me in the right direction. Lately i was reading about the flat sequence structures, maybe that would be one way but i am not so sure.
Hope to have some advices from the experts. Thanks in advance
09-21-2016 06:50 AM
@acuteboy wrote:I dont find any good example. It would be nice if somebody could push me in the right direction. Lately i was reading about the flat sequence structures, maybe that would be one way but i am not so sure.
Hope to have some advices from the experts. Thanks in advance
Dear Acute (you can call me Chronic),
I wouldn't call myself an Expert, but I do have some important advice, even without looking at your code (don't worry, I'll look and come right back) -- do not use a flat sequence structure. The purpose of this structure is to enforce Data Flow -- you have to do everything in the first sequence block before you can do anything in the second.
A much better way to deal with sequence flow (I would call it "The LabVIEW Way") is to use wires, particularly the Error Line which runs through the bottom left and right connectors on the vast majority of the functions that NI provides, and that should be in every VI that you develop. Almost the only time I use them is when I need to use a function, such as some of the Time functions (which lack Error Lines) and need to "sequence" them ("Start the clock when this function finishes") -- I put the Time function in a little Sequence box and tunnel the Error Line from the "Start timing after this" function through the Sequence. This makes the Time function run "next".
Bob Schor
09-21-2016 07:10 AM
OK, I've now peeked at your VI. First suggestion -- read the description you wrote about what it is you want to do. Then start over, trying to develop (and think) in a Top-Down fashion how to accomplish your goal(s).
Bob Schor