Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How can three 5 digit numbers be sent from one DIO-96 to another?

What is the best way to do this from one computer to another using DIO-96 devices? The second computer needs to know when the data is valid. I am learning to configure the ports but I am unsure of the best way. Can I use one PPI for each number and use the fourth PPI to the handshaking?
0 Kudos
Message 1 of 3
(3,231 Views)
Hi cbl,

The best way to perform this is to create your own handshaking in software. There is no way to implement handshaking between the devices on a hardware level unless an external strobe or clock is used.

What I would suggest is to break your 5 digit numbers into bits. If you are dealing with unsigned integer 5 bit numbers they can all be represented by 13 bits, 14 if they are signed (include negative). Since each chip has 3 8 bit ports you might as well use 16 bits to represent the numbers (unless you are dealing with floating point numbers, then use as many as possible and create a binary scheme to represent them).

As for the handshaking between the two computers, as you suggested, I would use the 4th chip to handle the handshaking. You will
probably have to come up with some ready/acknowledge scheme to accomplish the handshaking. For instance, you could have the reading board output a flag when it is done reading at which point the output board will change it's data ready flag and also change an acknowledge flag. Once that is done, the reading board should change it's done flag back to notify that it is ready to read again. This is an example of a scheme you could use.

This will all be done in software. Therefore you will have a processing loop that will run as fast as you want and it will statically poll the lines to read the data and monitor the handshaking lines.

Anyway, I hope that helps. Have a good day.

Ron
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,231 Views)
Hi Ron,

Thank you for you answer and it does help. I was planning on using one chip to give me 24 bits for each number because the numbers are 5 digits as in +89999. Are all the digital lines updated at the same time? Are all the digital lines for one chip updated at the same time?

Would you handshaking scheme change if I wanted the output computer to continuously update the data and have the reading computer, when ready to get data, check a data valid line and when good, read the data? Hope that makes sense.
0 Kudos
Message 3 of 3
(3,231 Views)