Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Example code to convert "write to digital port" to "write to digital line"

Dear Sir,
could you please suggest me an example code to convert"write to digital port" to "write to digital line".
0 Kudos
Message 1 of 4
(2,945 Views)
Maruthi,

I am not sure that I understand your question. If you open both Write to Digital Port.vi and Write to Digital Line.vi you will see that they are both built using DIO Port Config.vi and DIO Port Write.vi. With Write to Digital Line.vi, the line mask ensures that only the selected line is written to. Maybe you could expand on the conversion you are looking for.

Spencer S.
0 Kudos
Message 2 of 4
(2,945 Views)
Dear Sir,
I am using the concept of counting the pulses from the shaft encoder in order to control my engine. I have a 4 cylinder 4 stroke IC engine, that I am trying to control. I am using a PCI 6025E which has 32 digital I/O lines, out of which only 8 are line configurable and the other are port configurable. I am using 16 channels in my application for 16 components that I am controlling. I have designed 16 different modules to control. I am reading the line state of the encoder as input and based on that, all the 16 channels in the modules write data to the line. I dont have any problem with the 8 lines of port DIO as it is line configurable, but I am facing some problem with 8 lines on PA port as it is port configurable and it ouputs a p
attern. I am looking for some code in order that these "write to port" that I use for the remaining 8 channels somehow write data to the line.

Maruthi
0 Kudos
Message 3 of 4
(2,945 Views)
Maruthi,

DIO Port Write.vi has a "line mask" input. You can use this input to determine which lines the write affects. If you set only bit n in the line mask, the VI changes only port line n to the state that bit n of the "pattern" input specifies. Is this the functionality you desire? If I have misunderstood, let me know.

Spencer S.
0 Kudos
Message 4 of 4
(2,944 Views)