Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronization of the operating cycles of a small automatic sorter of seeds

CIMG3635.JPG

 

Hello everybody!

My name is Eleonora, I am student from Bulgaria and  I am not very familiar with Labview at the moment, but I need to develop Labview software in short time. My goal is to develop a DAQ based controlling part of a system, witch have to synchronize the data processing (Matlab script or Vision Assistant application) of the system with the mechanical actions. The system consists of pc, NI 6008, transpoter (powered by motor), color camera (the processing and analysis of data is based on color images) and discharging unit (movement of the inspected elements to fall into a box -in case A or activation of a valve, so that the elements fall in another box). In brief: the system is waiting a signal from a sensor (DI;P1.1) , when there is a signal the transporter has to stop and position the element  under the camera for image acquisition and processing (there are two options decision A and decision B) if decision A is true  - the transporter has to start again it’s movement (Q1; P0.0), the element will fall in a box A, a green LED has to flash (P0.5)  if decision B is true, the system has to activate (open) a valve (Q2;P0.1), so the element will fall in box B, a red LED has to flash (P.04). The main problem now is how make a RS triggering procedure to control the actions (operations) depending on the sync signals.

 P.S. The positioning of the elements is pursuant with the time needed for stopping the transporter and it is around 2 sec.

 

I will be very happy if someone can help me to resolve my problem. Thank you in advance!

Eleonora Kirilova

 

 

0 Kudos
Message 1 of 5
(3,599 Views)

just as a suggestion...you might want to also post in the Machine Vision forum or the Motion forum...

0 Kudos
Message 2 of 5
(3,582 Views)

Thank you I will try!

0 Kudos
Message 3 of 5
(3,571 Views)

Hi Eleonora,

 

If I understand your question correctly, your issue is how to run the DAQ tasks at the right moment with LabVIEW?

 

If this is so, the solution can be fairly simple. You could either use a flat sequence (it's basically a number of events chained in a known order) and a case sequence. A more elegant solution would be using a state machine in LabVIEW. 

 

You could have the following states:

  1. initialization (where you open references, allocate resources, etc)
  2. running the transporter to the camera and stopping it there
  3. acquiring and processing the image and making the decision. If the decision is B, go to state 4, else, go to state 5
  4. blow the element
  5. run the transporter (presuming that the transporter leads to the box, eventually, the elements will fall in the box)
  6. when you get a signal from the presence sensor, stop the transporter and go to state 3 (furthermore, here you can add a condition that sends the application to the closing state)
  7. closing (where you close references, delicate resources, etc.)

In state 6 you can have a simple comparison (like if sensor = false then the next state is state 6 else, if the sensor = true, then next state is state 3). You can do that using the select function. You can find more about event driven state machines here

 

Vision Assistant can be a great way of analyzing the images. You can find more about it here. For the camera you could use drivers such as NI-IMAQ, that you can download here (you should really test this, because I don't know what hardware you have there).

 

For an easy start, you can open the state machine template or an exemple that is already in your LabVIEW.

 

As far as the DAQmx tasks go, you can learn more about them here.

 

So, if your question was what is the right approach for developing the application in LabVIEW, a state machine in LabVIEW using IMAQ drivers for the camera, Vision Assistant for the image processing and DAQmx for controlling the hardware will do the trick.

 

Please let me know if this helps.

 

Regards,

Rares

Best regards,
Rares C.
0 Kudos
Message 4 of 5
(3,565 Views)

Thank you very much Rares!!! I am so glad that you understood exactly what I mean despite of my bad English (I think!) and your answer is very informative and  useful for me. 

Yes I think your desicion will be the right answer of my question :))

I will read the sorces which you wrote me in your post and then  I will try to do it by means of State Machines!

Definetely I will report the VI which I'm going to do. Probably it won't be so easy for me , but in the future I will be happy if you want to check  my Block Diagram after I do it and to give me your opinion about it.

Best Regards, Eleonora.

0 Kudos
Message 5 of 5
(3,549 Views)