LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data aquisition on parallel port

I have connected the board and opened the exemple in labview! I RUN it! When I press START (manual start on the board) the number 17 pin turns off and then back on! so ...the exemple works...as the number 17 pin is indeed the MANUAL START PIN.

The sensors are ment to be read on the pins 1, 14 and 16!

You were talking about extractig the line...how do I do that? 

0 Kudos
Message 11 of 15
(345 Views)
Those are control lines from the pc. Why did you use those instead of the data lines? In any case, they are bits 0,1,2 of the control register and you would mask off all other pins. For example, if you AND the data with 0x02, you will get just the data for bit 1. If the ANDed data is equal to 0x02, then bit 1 is high.
0 Kudos
Message 12 of 15
(336 Views)

snuk wrote:

[...] opened the exemple [...] 


I think that with "the example", you are referring to Parallel Port Read and Write Loop.vi. If you look into the blockdiagram, you will see "port in" and "port out"; those are the functions to read/write data to the parallel port. Just as Dennis wrote, you have to mask all lines to retrieve the line(s) you are interested in....

Still, each line will only return 0 or 1 (LOW or HIGH).....

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 13 of 15
(328 Views)

Hm, ok, now i think what you are up to: Port In, Port Out do only address data lines of the parallel port. Pin 1, 14 and 16 are control lines and therefore do not show up in the data read.

 

Pin No (DB25)    Pin No (36 pin)    Signal name    Direction    Register - bit    Inverted 

        1                          1                 nStrobe         In/Out         Control-0         Yes 

        14                         14             Linefeed          In/Out         Control-1         Yes

        16                         31             nInitialize         In/Out         Control-2         No 

 

 

There are no functions predefined in LV to access those lines. You can write your own part of software to do this. You can find some introduction to this here

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 14 of 15
(324 Views)

Woha, again, i was to fast..... reading first, writing then would be better.....

 

Parallel Port.PNG

 

 

So if you increment the port address twice, you will be able to read the control lines using "Port In". Just have to mask then.....

 

hope this helps,

Norbert

Message Edited by Norbert B on 07-07-2009 09:26 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 15 of 15
(318 Views)