LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pot meter to trigger digital channel

I have a potmeter   from 0 to 10 volts

And a 6008

Now i want to trigger a digital channel or port   when the potmeter reach a certain value   let say the user says  8.86  volts

Now if the  value  is  lower then this value a trigger must activated to  the digital channel to activated a motor  until the value of the user programmed value is reached of 8.86

I have no idea how i can trigger the digital channel to get activated and stop until the value is reached

 

Can some give me a example how to deal with this kind of problems

 

( 6008 has no pulsetrain)

0 Kudos
Message 1 of 8
(3,333 Views)

The USB-6008 does not support hardware analog or digital triggering, so you will have to do software comparison.

 

Continually poll the voltage (using DAQmx Read in a loop) from your potentiometer (I imagine that's what you meant by potmeter), and if the voltage returned is over 8.86, then do a digital write to send 5V or 0V to your digital port.

 

You could even update the digital line each time you read the potentiometer voltage.  Do a greater than 8.86V comparison, and wire the T/F output from that comparison directly into the digital write to your port.

 

If your motor is looking for a pwm signal, then you will not be able to supply that with the 6008 very accurately.  The counter on the 6008/6009 is not as functional as the counters on other boards, and cannot generate PWM signals.  The only way you could do PWM with the 6008 is by doing soft-ware timed output on the digital lines.  However, this will result in very poor repeatability and is entirely dependent on your computer's computational speed as well as frequency / duty cycle needs.

 

If you want to explore the software timed option, see Software-Timed PWM Using a Digital Output Line.

 

As an alternative, any of our USB M series devices, or a cDAQ chassis with DIO module, will be able to do PWM signal generation through a counter.

0 Kudos
Message 2 of 8
(3,316 Views)

Continually poll the voltage (using DAQmx Read in a loop) from your potentiometer (I imagine that's what you meant by potmeter), and if the voltage returned is over 8.86, then do a digital write to send 5V or 0V to your digital port.

 

Do have a example function of that ?!

 

 

 

You could even update the digital line each time you read the potentiometer voltage.  Do a greater than 8.86V comparison, and wire the T/F output from that comparison directly into the digital write to your port

 

same here 

 

 

 

My motor is very slow   and does not look for a pwm signal     hence there is even a relais to start the motor (24 volts  ) so its really slow 

 

 

0 Kudos
Message 3 of 8
(3,303 Views)

You might want to first review the information at DAQmx Getting Started. This is a pretty simple operation.

 

 

 

Message Edited by Dennis Knutson on 04-06-2010 08:23 AM
Message 4 of 8
(3,285 Views)

Thanks  Dennis!

Some time you  i can think complicated and the solution can be so simple.

 

 

0 Kudos
Message 5 of 8
(3,271 Views)

Dennis  sorry to ask

Sometime ago i thought that i have read that i can import a png in labview and run it as a program

is that right i want to take this image that you have provided as a example

 

So again am i right or.............

 

if so how do i make it to run it as a program  ?

 

0 Kudos
Message 6 of 8
(3,253 Views)
Download the file and drag it to a block diagram if you are using LabVIEW 2009. There is a help topic called 'Reusing Snippets of Code'.
0 Kudos
Message 7 of 8
(3,247 Views)
I am using 8.6
0 Kudos
Message 8 of 8
(3,239 Views)