LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading and writing to a digital port of 8255 using files

hello!! i am new to Lab View. im using DAQpad-6508 .In which m using 2 PPI's for writing the data and the other 2 for reading.

all i have to do is to give binary/decimal  inputs  (00000001, 00000010..... or 1,2..... etc.) to the PPI's for writting (i don want to use switches for this purpose) and read back the

remaining 2 PPI's.

i was wondering if thats possible to first save the binary input values (that i want to write to the digital port) in a file and supply these values to the digital ports one by one. Is this possible and how?

secondly i want to compare the patterns read from the remaining PPI's with some stored patterns and see if they match.

Is it possible to store data being read from a digital port into a file and how? and in which format will that be stored in the file?

id really appreciate immediate replies. thanks in advance

0 Kudos
Message 1 of 5
(3,203 Views)
Hello Huzach,
 
There are various ways to read from a digital port, log the values to file, then read them back in.   If you're reading your values in as an integer one port at a time, you can save these integers to a speadsheet file with the Write To SpreadSheet File.vi.  Then you would read the values back with the Read To SpreadSheet File.vi. 
 
Thanks
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 5
(3,189 Views)
hello,
is it possible to just configure a single line of a port of 8255 for writing.
id really appreciate urgent replies.
thanks in advance.
0 Kudos
Message 3 of 5
(3,167 Views)

Hello Huzach,

You cannot configure individual or single lines on the 8255 chip.  All the lines in a port must be the same direction.

Micaela N
National Instruments
0 Kudos
Message 4 of 5
(3,137 Views)
I'm not sure if this is what you are asking, but I have controlled individual lines on an 8255 port, to control discrete devices (solenoid valves) one at a time. As the others have said, you must configure an entire port as either input or output, but there is nothing to stop you from controlling the individual output lines within the same port. I did so with bit masking techniques, so that I could switch one bit of the port without effecting the other seven. If this is not what you are asking, then sorry for taking up your time. If it is what you need, then good luck with your project. If you wish, I could probably dig out the old code that I used (this was a couple of years ago).

Good luck,

Dave Green, Manager, NAAT, INc.
0 Kudos
Message 5 of 5
(3,134 Views)