Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

change notification syntax in 6527: DIG_Change_Message_Config

I like to add discrete I/O input pins from 2 ports to be monitored (generate events). When I use  DIG_Change_Message_Config function for one port, it works.The

riseChanStr

and fallChanStr string syntax is confusing for more than one port. I used function refence and followed this pattern.., but it doesnot work.

1. (0, 3, 5) port 1, lines 0, 3, and 5

1.0:5,2.1:4 port 1, lines 0 through 5; port 2, lines 1 through 4

It only accepts one port setting. Please give me a description of the syntax for multiport. For instance:

*fallChanStr ="0.7, 1. (0, 3, 5), 2.0:4"   ... htis doesnot work.

Thanks

 

0 Kudos
Message 1 of 4
(3,732 Views)
Hi delowar,

Are you using the NI-DAQmx driver or the Traditional NI-DAQ (Legacy) driver?

If you are using NI-DAQmx, you can try these as your strings:

For port 1, lines 0, 3, and 5:
"Dev1/port1/line0, Dev1/port1/line3, Dev1/port0/line5"

For port 1, lines 0 through 5; port 2, lines 1 through 4:
"Dev1/port1/line0:5, Dev1/port2/line1:4"

I hope this helps!
Regards,
Erik J
0 Kudos
Message 2 of 4
(3,695 Views)
Thank you Erik. I am using Traditional NI-DAQ (Legacy) driver in CVI environment.
 
After trying many different possible syntax, I think the port string syntax would be
 
string ="(0.2,3,6,7), (1.4,6,7)"... translates to    port0 line 2,3, 6,7  and port1 line 4,6,7
 
It seems to work. Thanks again.
 
Delowar
0 Kudos
Message 3 of 4
(3,690 Views)
I'm glad it works, good luck in your application!

Regards,
Erik
0 Kudos
Message 4 of 4
(3,684 Views)