LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI 6251 USB - Sensors, actuators and LED's

Hello,

I am new to LabVIEW and I want to do a project using the NI 6251 USB as a DIO device.

Details about the project:

- 2 actuators

- 4 sensors

- 3 LED (Red , Green, Yellow)

We have the following cases:

 

Case 1: If sensors 1 and 2 are activated, the Green LED is turned on (for 5 seconds) and the actuator 1 is activated .

Case 2: If sensors 2 and 3 are activated, actuator 2 is activated and the Yellow LED is turned on for a period of time (10 seconds).

Case 3: If sensor 4 is activated, all actuators will stop and the Red LED is turned on.

For any other combination of sensors activated (for example sensor 1 and 4, the Red LED is turned on).

The software and hardware is already installed, i must now do the VI but i don't really know how to use all this information i presented above, or where to start.

0 Kudos
Message 1 of 10
(4,232 Views)

Hello,

welcome to LabVIEW.

 

It would be good to know:

  • Which version of LabVIEW you are using.
  • How the elements are connected to the USB.
  • how the sensors will be activated.

Have fun programming in LabVIEW and good luck for your project.

 

Here are some useful links highly recommend to new LabVIEW users:

NI Learning Center

NI Getting Started

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-cRIO Developer's Guide

 

LabVIEW Wiki on Training

 

Greetings and Regards,
James
0 Kudos
Message 2 of 10
(4,181 Views)

  • @JamesSouv wrote:

    Hello,

    welcome to LabVIEW.

     

    It would be good to know:

    • Which version of LabVIEW you are using.
    • How the elements are connected to the USB.
    • how the sensors will be activated.

     

     

     

    Hello, thank you for all the useful links for documentation. Below i added the information.

 

  • Which version of LabVIEW you are using - LabVIEW 2015 SP1
  • How the elements are connected to the USB -  
    • the NI 6251 will be connected to a laptop using the USB port .
    • sensors and actuators will be connected to the DIO device NI 6251
  • how the sensors will be activated. - The sensors will be activated by a 12V input, that means logical 1. Anything less than 12V will not activate the sensor, and will mean logical 0.
0 Kudos
Message 3 of 10
(4,173 Views)

Hello,

 

I have tried to implement a simple logic to help you out.

I am not really sure if it is what you want your program to do exactly, but it gets the LEDs turned on.
I add a second wait function to allow you seeing that the LED turns off. (otherwise you will have the impression that it stays constantly on)

 

Now it depends on you to find out, how the signals for the sensors will be provided..

Hope it helps you programming your task.

 

Regards,

Jamessensor and LEDs.jpg

Greetings and Regards,
James
0 Kudos
Message 4 of 10
(4,164 Views)

Hello James, 

 

It helps yes, thank you for your time.

I will find a way to work the sensors out, but I still don't know how am i going to use the NI 6251 device with DAQmx to control the actuators (it can be any type of actuators, i only need the logic behind a control solution for any type of actuator)

 

Best regards,

Alex

0 Kudos
Message 5 of 10
(4,156 Views)

Hello, 

It would take too long to explain you how to use your device with DAQmx.

But here you are provided a link, where you will find the most relevant things you need to know about DAQmx.
After acquiring this knowledge, you will be able to configure your device, simulate devices and also make measurements.


Good luck with your Project.
Greetings and Regards,

James.



Greetings and Regards,
James
0 Kudos
Message 6 of 10
(4,139 Views)

Hi,

 

Will i be able to use a simulate signal function to activate the sensors ? How can i do that ?

And after that , can i set the sensors to activate the LED ?

 

Best regards,

Alex

0 Kudos
Message 7 of 10
(4,107 Views)

@AlexDIO wrote:

Hi,

 

Will i be able to use a simulate signal function to activate the sensors ? How can i do that ?

And after that , can i set the sensors to activate the LED ?

 

Best regards,

Alex


Look at the example posted above.  It shows you how to simulate everything before you hook up your DAQ.  Once you get your logic working then introduce the actual hardware using DAQ.

0 Kudos
Message 8 of 10
(4,101 Views)

How to use DAQ with the example above ?

0 Kudos
Message 9 of 10
(4,069 Views)

Hi Alex,

 

replace your "sensor" controls with wires coming from DAQmxRead functions…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 10
(4,067 Views)