Hi cross,
Both the E and M Series devices will allow you do to digital nd analog input simultaneously, but only the M Series will allow you to perform hardware timed digital sampling. If you're using a M Series device, I recommend starting with the LabVIEW shipping example, "Multi-Function-Sync AI-Read Dig Chan". If you're using an E Series device, you can perform a software timed digital read (data sampling time is controlled by loop), you can set up both an analog and a digital input task in your program (combine an analog acquisition and a read digital port example).
Does your program freeze up when you run your VI? Despite setting the VI to the highest priority, the processes could still be taking up your system's resources depending on your sampling rate, your system, and other applications that might be running. You can try sampling at a lower frequency, increasing the buffer size, closing out unnecessary applications, and if possible, try running on a different system.
Hope this helps,
Lesley Y.