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.
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.
01-21-2019 12:21 PM
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.
01-21-2019 01:22 PM - edited 01-21-2019 01:24 PM
@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.
01-21-2019 01:44 PM
Okay.. Thanks a lot! I'll code using the write line command.
09-27-2020 05:54 PM
Hey, did you managed to make it work?
Having same problem.
If you did, could you please send VI?
Thanks
09-28-2020 09:49 AM
Hey!
I cannot send you the VI, but here's a picture of the same:
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.
09-28-2020 10:01 AM
For some reason i can read values but cannot write.
Tried whole day. Not working (
Even simple LED connection not working.
09-28-2020 10:49 AM
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.
09-28-2020 10:53 AM
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:
Try using these.