From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview writing incorrect DIO port in USB 8451

Solved!
Go to solution

There are 8 ports on the 8451 p0.0 to p0.7. I'm trying to control multiple relays, hence I'm using multiple ports. If i use multiple lines in one port, then I'll have to code for all the bits in a line every time I have to send a signal to only one relay, which might make stuff complicated.

0 Kudos
Message 11 of 18
(1,180 Views)
Solution
Accepted by topic author vedsoni1996

@vedsoni1996 wrote:

There are 8 ports on the 8451 p0.0 to p0.7.


Wrong!  That is 1 port (P0) with 8 lines (0 - 7).

 


@vedsoni1996 wrote:

If i use multiple lines in one port, then I'll have to code for all the bits in a line every time I have to send a signal to only one relay, which might make stuff complicated.


Wrong again.  You use the Write Digital Line like I showed in my previous post.

 

It sounds like what you really want is something like the USB-6509, which has 12 digital ports (P0 to P11), 8 lines per port, adding up to 96 individual lines.  And,yes, you can create a separate task at the line or the port level.  So control of your individual relays would still be simple.


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 12 of 18
(1,174 Views)

Okay.. Thanks a lot! I'll code using the write line command.

0 Kudos
Message 13 of 18
(1,164 Views)

Hey, did you managed to make it work? 

Having same problem.

If you did, could you please send VI?

Thanks

0 Kudos
Message 14 of 18
(1,019 Views)

Hey!

 

I cannot send you the VI, but here's a picture of the same:

vedsoni1996_0-1601304443959.png

Basically, there's only 1 port with 8 lines (0 - 7) on the NI 8451, so keep the port number unconnected and set the line number to what you want.

0 Kudos
Message 15 of 18
(1,005 Views)

For some reason i can read values but cannot write.

Tried whole day. Not working (

Even simple LED connection not working. 

 

0 Kudos
Message 16 of 18
(1,001 Views)

Refer to the image in my previous post. For writing values, you need to set the Logic Value control to FALSE, I guess. Try changing it from 0/1 and see what happens. Best thing is to refer to NI 8451 user manual.

0 Kudos
Message 17 of 18
(994 Views)

Just saw your image. Why have you put the writing part inside an infinite while loop?

 

Your while loop will never stop if you've set FALSE as a stopping condition. I'd say remove the while loop.

 

And as I said before, try changing the value of the boolean. Also, these are the properties I set in my NI-845x device configuration:

 

vedsoni1996_0-1601308278606.png

 

Try using these.

 

0 Kudos
Message 18 of 18
(992 Views)