LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to write multiple lines high

I have LV 5.0, PCDIO-24 card & WinME

I am trying to write multiple lines high, but when I write one high
the others reset. I read about the 8255 chip problem & found an
example vi on NI's website that maybe a work-around, but it won't run
with 5.0. I am somewhat new to Labview and request help! How can I
open "Write to Multiple Digital Lines.vi" with 5.0,
or does someone have an similar example vi?

My vi has 3 different delay timers that try to write data high when
they countdown to zero. They work fine one at a time but not when I
put them into a single vi and run them all at once.

Thanks,

MikeB
0 Kudos
Message 1 of 4
(2,681 Views)
I think your problem is that you're using something like Write to Digital Port.vi which writes to all lines. Use the lower level function DIO Port Write.vi and set the line mask. The line mask is used to determine which lines to write to and which lines to leave alone. For example, if at one point you just want to write to bits 5,6,7, set the line mask to 1110000 (assuming 8 bit port). If at another point, you just want to write to bits 0,1,2, you would set the line mask to 00000111.
Message 2 of 4
(2,681 Views)
Dennis Knutson wrote in message news:<50650000000500000038E50000-1042324653000@exchange.ni.com>...
> I think your problem is that you're using something like Write to
> Digital Port.vi which writes to all lines. Use the lower level
> function DIO Port Write.vi and set the line mask. The line mask is
> used to determine which lines to write to and which lines to leave
> alone. For example, if at one point you just want to write to bits
> 5,6,7, set the line mask to 1110000 (assuming 8 bit port). If at
> another point, you just want to write to bits 0,1,2, you would set the
> line mask to 00000111.

When I try to set the line mask of "DIO Port Write.vi", it won't allow
me to have a 0 as the first digit. If I enter 00001111 for example,
the zeros dis
sappear as soon as I click the check-box. (the line mask
box will reset to 1111). What am I doing wrong?

Thanks for the help!

MikeB
0 Kudos
Message 3 of 4
(2,681 Views)
The only thing wrong is that I gave you a poor example maybe. The leading zeroes are dropped because they're not relevant. 1111 equals 00001111 or xF or d15 or whatever representation you want to use.
0 Kudos
Message 4 of 4
(2,681 Views)