Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Reconfiguring DIO32HS port group for pattern i/o resets other ports

I need to send a clocked datastream at 2.5Mb/s and receive data at the same speed from an external device. I also want to configure 24 other data lines as outputs but when i configure the group for pattern i/o the output states get reset. Maybe there is another way to configure the ports.
0 Kudos
Message 1 of 4
(3,281 Views)
Any time you configure a port on one of the digital cards, it will reset all of the ports. The easiest work around it to configure all of the ports you will be using at the beginning of your code. Then use them however you want through out the program. When you get ready to close your program you can call DIO Clear or reset the ports.

I hope this helps.

Joshua
0 Kudos
Message 2 of 4
(3,281 Views)
Played with the DIO card some more. I have handshaking setup which restricts me to using groups. There are two groups setup. One for output which uses port0 and 1 and the 2nd group as input on port2,3. I couldn't get it to work with group1 as port0, and group 2 as 1,2,3. I had to write blocks and make sure that when i send a data stream on line 0, I need to add the value of the states of the other bits (line 1 to 15) otherwise the other lines are set to zero. When you write a data pattern the card automatically writes to all 16 bits. Some bit manipulation later it works! Reading data states is easier and simply requires a DIG_Line_Config() and DIO_In_Line() commands to read line states.
0 Kudos
Message 3 of 4
(3,281 Views)
Helped. Thanks.
0 Kudos
Message 4 of 4
(3,281 Views)