Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

MICOS Motor with Image Acquisition

Hello all,
 
I am using MICOS PLS-85 motor controlled stage in combination with an Imaging Solutions Group (ISG) LW 1.3-SM camera.  Some of you may already know, but the MICOS stages come shipped with an instrument driver "MOCO Control" that displays position and controls motion of the motor amongst other functions.
 
I simply added a case structure that acts every time the motor is moved so that an image is captured.  However, the only iteration count I can take that isn't always 1 from the for loop displayed is the outter loop that is continuously running but gives me values dependent on the span between images taken...(one array could be 3, 14, 24...another could be 6, 35, 38...all relative to when I move the motor).
 
 
For anyone familiar with this instrument driver, or anyone who has a clever way of getting the number of times a button is pushed, I need help sending the array of times the button is pushed (1,2, 3...) if pushed 3 times.
 
Alas, I'm having trouble with the sequence locals for my paths.  When I initialize the array and insert or replace the array subset I either receive blank arrays or the first value of the array changes.  I can't use tunnels either cause I only want paths to be inserted when I push a button and true case is executed, the false case is executed when the vi is running but controls are idle.  I basically need an alternative solution to creating an array of paths.
 
This all seems very overwhelming, but it's the best I could explain.  Please take what you can from it and feel free to ask questions so I can better explain the shades of grey.

Message Edited by Steve.Briggs on 10-19-2007 10:33 AM

0 Kudos
Message 1 of 4
(3,522 Views)
Hey Steve,
 
So as I understand it, you are trying to control what data is passed into an array outside of a loop.  I examined the PNG attached below and I was having trouble analyzing it.  I assume that what is shown below is the true case for your case structure.
 
If you want to only pass the filepath to the array when the condition is valid, you can simply put your array inside of the main true case of the structure with the rest of the code.  That way, it is only written to when the case is true.
 
I hope this helped you, but if it didn't, feel free to post back on here and I will help you out further!
 
Take care,
 
 
Evan D.
Installer R&D
National Instruments
0 Kudos
Message 2 of 4
(3,492 Views)
Hello Evan, thank you for responding.
 
Like I said, I'd have to clarify some things a bit once it is actually looked at...
 
This is in fact the true case for my case structure, the false case simply does nothing but return the default value of 0.  The trouble I'm having is that I have no idea what sort of array I'll have coming in due to the outside while loop iteration count being unknown.  I put it into a string along with the root to where the file will be going...for example if I were to take 3 images they could be saved as file12, file23, file26...or file15, file28, file39...completely random fashion.  I'm able to index the array in such fashion that when the VI is idle and the false case is returned that only 0s are placed in the array, and when the true case is returned the iteration counts(12, 23, 26 or 15, 28, 39) are inserted in the array where they should be (the 12th, 23rd, and 26th positions...and so on).
 
From here on I can't seem to find the right way in handling and searching for the data I want or don't want.  Searching through the 1D array for 0s only locates the first 0 so I'm left with a lot trailing.  I can't search for the iteration count I want cause I simply don't know what the exact value of it is until the VI is completed.  Perhaps doing a search for values greater than 0 and then deleting the values before the instance of it?  I can't seem to get that to work in the right way either.  Attached is the array of values I have and the index of it...pretty simple stuff.  Any ideas in handling/searching/deleting/parsing the data?
 

Message Edited by Steve.Briggs on 10-23-2007 08:31 AM

0 Kudos
Message 3 of 4
(3,483 Views)
As of now I have a functioning method of getting the values I need.  I sort the array, reverse the order so values greater than 0 appear at the top, then I split the array after the last index thats greater than 0 and I reverse the order once more.  Not the prettiest or best way of doing this, but it is working.
 
I'll still take any ideas that you have though Smiley Very Happy
0 Kudos
Message 4 of 4
(3,475 Views)