Digital I/O

Showing results for 
Search instead for 
Did you mean: 

Streaming DIO with PCI-6503

I am trying to implement a DIO scanning application with a PCI-6503 in the .net C# environment.  There are two areas I'm having trouble with:
1. For streaming out digital data (such as MultipleWrite commands), I don't get the proper output - is this not supported by this board?  According the documentation, it looked like I couldn't use digital waveform outputs, but I thought writing multiple samples was ok as long as I don't enable hardware triggers.  Any advice or examples here?
2. Part of my application is reading a switch matrix, for which I need to quickly force a signal and then read 8 lines over the same port.  It looks like this is designed to work with the 8255 chip mode 2 operation, but I haven't found any specific references on how to do this in the .net documentation.  If this is indeed the correct way to do this, how do I configure my device through the .net environment to operate this way?
0 Kudos
Message 1 of 6
Hello Ootama.  While outputting digital data, you said that you were not seeing the correct output.  What output levels are you expecting on the digital lines and what output are you getting?  Also, what switch module are you using?  There is functionality for controlling switches in the NI Measurement Studio Help, which can be found inside the Microsoft VIsual Studio 2005 Documentation.  This may be a good place to get started. 
Brian Fleissner
National Instruments
0 Kudos
Message 2 of 6
I have a remote device to read the signals, but it is not receiving them - maybe they are just being transmitted too quickly?  It is rather time critical, and when I use single writes it is far too slow.
With the switch matrix, I need to force a line and then read a port over and over quickly.  I have seen reference to the 8255 mode 2 setup to do this, but I haven't been able to find any examples for doing this in .net components.  Any reference available?
Actually I've been frustrated trying to figure this out, so I re-wired the system to use 2 parallel ports and was able to program exactly what I need in an hour.  Maybe NI should sell those...
0 Kudos
Message 3 of 6
Hello Ootama.  There are numerous examples on that pertain to your question.  Please feel free to explore them by going to our homepage and then searching within our "NI Developer Zone" for 'C# digital output'.  This search yields 29 example programs.  Although some of them don't exactly meet your needs, please refer to the links below for a few helpful ones:
NI-DAQmx: Writing to Single or Multiple Digital Lines Using C#
Write to Multiple Digital Ports (Visual C)
I hope this helps!  If it brings up any other questions, don't hesitate to ask!
Brian Fleissner
National Instruments
0 Kudos
Message 4 of 6

Thanks Brian, I had been through these already, but I don't think you really read the specific question I was asking: A .net example to set up 8255 mode 2 capability.  The NI user manual talks about it, but doesn't reference code to accomplish it...

Overall, I need to do sequential reads and writes of a single byte on a data bus about 1000 times per second.






0 Kudos
Message 5 of 6
As far as I can tell, there is no .net example for mode 2 yet.  However, there are a few more articles I can refer you to that may allow this to be programmable. 
Understanding the Bi-Directional Mode of 8255 Chip
How Do I Use Bidirectional Mode with an 8255 DIO Chip?
These 2 articles should get you started.  In the meantime, I will continue diving through some documentation to see if I can find an example program for you. 
Brian Fleissner
National Instruments
0 Kudos
Message 6 of 6