From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i want to take (1 or 0 ) signals from the labview

 i want to take (1 or 0 ) signals from the labview to drive the motor using pick  what can i do ? somebody told me to use serial cable is it possible and if it is how can i ?
0 Kudos
Message 1 of 21
(2,757 Views)

Other than the numeric or boolean value for 0 & 1, you have to tell us what you mean.

It could be voltage levels (0volt or 1 volt) etc..

 

Let's see...

 

you have a motor.

you have a PC

you have LabVIEW

you have a "pick"?

 

What is "pick".  Would you be referring to a microcontroller?  If so, there has got to be more circuitry around it.  I doubt that a microcontroller would drive a motor directly.

Are you using PWM? Do you need to vary speed?  How big is the motor?

 

If it is a microcontroller, then yes, RS-232 is likely one way to communicate to it.  It should have it's firmware and probably a set of commands that need to be sent to it.  Do 0 & 1 represent such commands?  Or do you want to use the boolean values to select which commands are actually being sent?

 

🙂

Message 2 of 21
(2,745 Views)

ohhhhh you r right 😄 i mean by (1,0)true or false and i deal with something call arduino it is like micro controller its one = 5volt 

so now how can i take 5 volt from my labtop using labview ?

khaledyr 

0 Kudos
Message 3 of 21
(2,727 Views)
Unfortunately, that's not much more information. What do you mean by 1 and 0 and 5 Volts? The PC is not a power supply, so you can't use it to source signals to drive something like a motor. Is your microcontroller actually controlling your motor? If so, is it connected directly (unlikely), or is there something in between (likely)? Does the microcontroller have an RS-232 interface, or some other interface that you can use to send commands to it?
0 Kudos
Message 4 of 21
(2,707 Views)

I'm guessing here because you probably have a problem with English.  You probably have a microcontroller-motor setup that uses RS232 serial communications.  You can connect a serial cable from you computer to the controller.  You will need to know the controller settings, like baud rate, parity, stop bits, address.  You can use Labview VISA to setup the serial port.  Use VISA to also send commands to the serial port.  Send a 1 to get 5 volts from your controller to the motor and send 0 to get 0 volts.  If I am not right, you need to specify us with the commands that the microcontroller expects.  Either way, VISA is the way to go for serial communications.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 21
(2,705 Views)

ok every one i am doing a fire fighting robot that search for the fire using camera i finished the lab view match pattern program and now i can find the fire and locate it in the image so i want to have from the pc any signal represented in voltage when the lab view program find the fire which mean i want to convert the softwear to hardwear this volt or signal i will take it on terminal of relay that will conduct the motor so the robot will continue moving and when the program of lab view didn't find the fire the signal output will be zero so the relay is off an the motor is off i think now every single information has been explained

khaledyr    

0 Kudos
Message 6 of 21
(2,694 Views)

Labview does not generate voltages.  You need a power supply or a digital out or analog out hardware.  It depends on how much current drain there will be on the hardware side.  You can buy a USB device, analog out or digital out, and control it with Labview.  Labview can tell the device when to put out 5 v and when to put out 0 v.  If you don't need much current, you may be able to use the parallel port on the computer to produce 5v.  If you need much current, use a power supply that can be controlled by USB or GPIB or serial RS232, then use Labview to communicate with it.  If you are driving the motor directly, you will probably need a power supply.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 21
(2,691 Views)

i know that lab view don't generate volt and i am using labtop so i don't have even serial or parallel ports and i have to use the USB so i want to know any kinds of power supply that lab view can deal with it and have USB port

khaledyr 

0 Kudos
Message 8 of 21
(2,678 Views)

khaledyr wrote:

ok every one i am doing a fire fighting robot that search for the fire using camera i finished the lab view match pattern program and now i can find the fire and locate it in the image so i want to have from the pc any signal represented in voltage when the lab view program find the fire which mean i want to convert the softwear to hardwear this volt or signal i will take it on terminal of relay that will conduct the motor so the robot will continue moving and when the program of lab view didn't find the fire the signal output will be zero so the relay is off an the motor is off i think now every single information has been explained

khaledyr    


 

Wow, that's one long sentence, and an interesting robot that needs to be controlled by software, for which LabVIEW is an excellent choice, but as others have mentionned it will not provide the voltage directly, but can control the device that does, such as a cheap trick by using telecom relays, which draw very little current and are actuated using a 5 volt signal, which could be from the parallel port, and the relay could be closed to provide up to 24v from a battery source to the motor.

 

So to recap:

 

PC > LabVIEW > algorithm > parallel port control > 5V actuated relay > provide power to the motor (but that means the PC has a tether from the parallel port to the robot)

 

However, from what I could understand, you already have the circuit which has a microcontroller.  You could use the RS232 (serial) port and send the appropriate commands. What I would recommend is first trying to communicate with the microcontroller using a terminal emulator such as HyperTerm or TerraTerm or ProComm.  That way, you could confirm that the motor / microcontroller is responding to the appropriate commands.  Once you are satisfied with the communication, you can easily implement using LabVIEW.

 

There are many examples of serial communication within this forum.  You can also do a search under the Help Menu and select Find Examples.  Within that enter serial as the keyword to search.  You will find 2 interesting examples a casic and and advanced serial communcation vi's.  Do have a look at the advanced examples as it will most likely be better suited for you.  You can modify the code to suit your needs.

 

Enjoy!

0 Kudos
Message 9 of 21
(2,676 Views)

khaledyr wrote:

i know that lab view don't generate volt and i am using labtop so i don't have even serial or parallel ports and i have to use the USB so i want to know any kinds of power supply that lab view can deal with it and have USB port

khaledyr 


 

Just saw your latest post.

 

A Laptop with no serial or parallel port.  Been there...

 

Well, your options are more limited.

 

You can purchase a USB to Serial converter.  There are USB to Parallel.  I think I have one kicking around somewhere.. 

You could also interface to your microcontroller using the USB port, if it supports USB.

 

Do you have access to USB peripherals, such as a USB-6009 DAQ?

 

0 Kudos
Message 10 of 21
(2,675 Views)