Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

String data to indicate ON/OFF of motor

Hi,

      Am using my pic controller for controlling various motors and valves. I have interfaced my pic controller with labview using Visa driver. I am passing binary data to labview through serial communication. Based on the binary data, i want to represent the ON/OFF of motor in front panel. pls anyone hlp with me. Am just using my labview for visual inspection of ON/OFF of the motor. Thanks in advance

0 Kudos
Message 1 of 9
(4,885 Views)

Please explain your protocol a little better.  How long is your message?  What does the data mean?  How many motors are you controlling and need to show status for?

 

Also, please show us what code you have so far.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(4,876 Views)

Thank you.

 Am using PIC Controller for controlling ie to turn on and off motor(4 Motors). Binary data is send from PIC to labview through serial port. If the motor is ON, in labview LED indicator should glow. Eg: Am passing data as, 0100 if the motor 2 is ON, 0010 for Motor 3 and 1111 for all Motor is set to ON.

0 Kudos
Message 3 of 9
(4,872 Views)

velkumar10 wrote:  Binary data is send from PIC to labview through serial port. If the motor is ON, in labview LED indicator should glow. Eg: Am passing data as, 0100 if the motor 2 is ON, 0010 for Motor 3 and 1111 for all Motor is set to ON.

So I'm left to assume this is all sent as a single byte.  In that case, this should work for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 9
(4,857 Views)
As I want to continuously monitor the status of the motor. Whether this vi will work that bro. And plz upload Vi bro. Am beginner for labview
0 Kudos
Message 5 of 9
(4,848 Views)

1. Do not call be "bro".

2. Please use complete words.

3. What I posted is called a snippet.  You can drop the image straight onto your block diagram you will have the code.  You may need to save the image to your harddrive first.  It does not always work with web browsers.

4. You might want to take some tutorials.

3 Hour Introduction
6 Hour Introduction
LabVEW Basics
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Learning NI
Getting Started with NI Products


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 9
(4,844 Views)
Thank you.
0 Kudos
Message 7 of 9
(4,842 Views)

Hi Vrossrulz,

  I used your snippet, when i use that program. only the Indicator 1 glows, if we send any data. I am continously sending the status of the motor through serially. so my labview program want to update the status. is there any way for mentioning end of the string in the visa read.

0 Kudos
Message 8 of 9
(4,802 Views)

This tells me we have the wrong format for the data coming across the serial port.  Perhaps you should share your code for the microcontroller side where you send the data through the serial port.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(4,792 Views)