LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dumb question: Difference between Digital Port versus a Digital Line?!

Hello All,
PLEASE excuse my numbskull question, but I can't find an answer to this question. What is the difference between a digital port and a digital line? I need to control some relay modules in our 2345 box. This works with digital line output, but I can also trip the relays using a Port write.

Any recommendations?

Thanks for all your input.
Max
0 Kudos
Message 1 of 8
(11,354 Views)
easy:
eight lines make one port (bit vs. byte)

Ton
Message 2 of 8
(11,353 Views)
To be even more correct a port is a collection of lines, but doesn't necessarily have to be 8 lines. Some National Instruments products have 32 bit ports (32 lines per port) for instance. You can find more information in the NI-DAQmx help by searching for port

Stuart G
0 Kudos
Message 3 of 8
(11,353 Views)
Thanks Ton.
0 Kudos
Message 4 of 8
(11,353 Views)
Thanks Stuart. I'll read the help section in MX.
0 Kudos
Message 5 of 8
(11,353 Views)
I'm in a similar situation with a relay box.  How do I set just one line to high?  Do I need to control a channel?  A single value in an array?  A whole array?  Do I need to tweak the DAQ Assistant to make the digital ports just output (not input)?
0 Kudos
Message 6 of 8
(11,082 Views)
Hello,

There are a few different ways that you can control your digital lines.  You can use the DAQ Assistant or you can program by using the DAQmx VIs that the DAQ Assistant uses to generate its code.

Either way you will need to write to a digital line so your lines will need to be configured as digital outputs.  There are a few good examples that you can use that are installed with LabVIEW.  You can find these examples by opening up the Example Finder (Help>>Find Examples) and then browsing to Hardware Input and Output>>DAQmx>>Digital Generation.>>Write Dig Chan.vi.  This example shows how to write the different lines on a port.  You can also choose to write just one sample instead of N Samples.  Depending on your situation you can change the polymorphic instance of the DAQmx Write VI and also change the line grouping constant from "one channel for all lines" to "one channel for each line" if you want to write in a different way.  But you can at least start with this example and make any changes you like down the road.

Have a good day,

Brian P.
Applications Engineer
0 Kudos
Message 7 of 8
(11,046 Views)

Hi,

 

I would like to know if you have found the answer to your question. I am also in the same situation and intend to turn on an on-off pump connected to a relay but I'm not sure if I should use "write to channel" or "write to port" example. Is each of the pumps a channel, port, or line? It would be appreciated if you could help me with this.

 

Best regards,

Amir

0 Kudos
Message 8 of 8
(2,105 Views)