LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

led glow through parallel port.

Can you give me a brief Idea so as to Correct my self.

And I am using local variables b'coz each I need to keep updating values to the parallel port.

And how can I solve my problem? Parallel port last part. 

0 Kudos
Message 11 of 28
(1,794 Views)

Totally agree with Dennis.

 

The code is a Fantasy House for sure.  Anything can happen in that code.

 

Before you go any further, try describing what you want this code to do and break it down into granularity (top-level view down to it's functional pieces).  A re-write is definitely required.

 

And before using the parallel port to light up LED's, you should try lighting up Boolean Indicators to see if the sw is doing what you want it to do.

 

As for driving LED's from the parallel port, I would agree with Coq Rouge, because you may end up having to replace your motherboard..

Message Edited by Ray.R on 02-25-2010 11:20 AM
0 Kudos
Message 12 of 28
(1,792 Views)
Can you help me, I am just two months old to Labview.
0 Kudos
Message 13 of 28
(1,790 Views)

Start from the beginning. 

 

Okay, we know you want to light some LED's (let's worry about the physical LED's later).

 

How do you want these LED's to light up?  How many LED's?  We need to get an idea of what you have in mind.

WHo turns on the LED's and how?  Why do they turn ON or OFF, what are the events that influence the LED's?

 

Etc, etc, etc...

0 Kudos
Message 14 of 28
(1,786 Views)

You only have to do a write when you change the bit values.

 

Why don't you give a look at the shipping example called Parallel Port Read and Write Loop? Use Help>Find Examples and do a search for 'parallel'. For doing just a write, I would modify it to use an event structure. If you want to use individual controls for each bit, you can use a shift register and OR all of the bits together.

0 Kudos
Message 15 of 28
(1,785 Views)

1) Hardware part - DB25 parallel port is wired to 7 LEDs (D0 to D7) and status pins (S3 to S7), status pin is input to the computer and data port which is connected to the LEDs are output from the computer. So If I program in such a way that If i play with my status pin (which is in the form of push button) according to the program my LED should glow.

2) Than means the Status pins(Push button) will glow the LEDs (Which is data pin.

3)Why do the leds turn on and off  --->  When ever it reads the rfid reader from the serial port (according to the program) If the RFID reader is valid what ever action you do in the parallel port it should do that. Here I am trying to glow some Leds, say if s3 pin of status port is pressed D6 led of dataport should go of and remain in off state untill s3 is pressed again.(If default case is FF means all the 7 leds ON).

similarly if S4 pin of SP is pressed D5 LED should glow etc.

3)Event which influence LED is only the SP(Status port).

I don't want the serial port part just tell me the parallel port programming.  

 

0 Kudos
Message 16 of 28
(1,767 Views)

I am using OR operation and AND operation according to my requirement but why the LEDs doen't remain in the same state for ever until I don't change it.

I want the control in my hand. 

0 Kudos
Message 17 of 28
(1,764 Views)
Why are you mentioning the serial port? No one mentioned that. Have you looked at the example I mentioned?
0 Kudos
Message 18 of 28
(1,763 Views)

Yes I have seen that example, And that is simple. I want the operation to remain the same until I manually don't change from the Status Pin.

I had mentioned serial port so that i could give u guys a clear pic abt the requirement. 

0 Kudos
Message 19 of 28
(1,753 Views)

It sounds like the problem that you are having with the parallel port is to latch previous states of LED's so that only one if affected and not all of them.  Is this correct?

 

You can't simply set a bit to the parallel port, you may need to have words associated with each binary state (Hex Word = number sent to the parallel port and binary state being the LED on or off).

 

Play with the example that Dennis mentionned and you will see what I am referring to.

 

R

0 Kudos
Message 20 of 28
(1,740 Views)