05-17-2010 05:31 PM
Hi, everyone! I am newbie and I have a project. Create VI which would generate pulses and send it through parallel port to device.
Pulse generators: 1 master
7 slaves
Slave:
synchronized with master
adjustable time-out before the beginning of the generated pulse
pulse duration: 50 microseconds - 360 s
I have looked an an example of "parallel Port Read and Write Loop.vi" but didn't help a lot.
Please, help me. Thank you.
05-18-2010 08:53 AM - edited 05-18-2010 08:54 AM
You will need to provide more information than that. What does "synchronized with master" mean? What does "time-out before the beginning of the generated pulse" mean? Is the computer the master, or is the master some other device?
First, let me remind you that the parallel port is not a general-purpose DAQ device. While it can be used for digitial I/O it is quite limited in doing so. At a minimum it's software-controlled. This means you have to toggle the line high and low to create a pulse. This means that you will likely never get a 50 microsecond pulse using modern operating systems. See this thread for a recent discussion on someone else who thought they could use the parallel port as a high-speed device. Your best bet is to look into a cheap DAQ device like one of the USB ones that NI makes, or something else from a third-party vendor.
05-19-2010 03:50 AM
Otherwise, you may use some microcontroller starting kit, spending about 50€ you should be able to write a real-time application with 1us or less time resolution capability. And you can communicate with your PC with through USB port (with some limitations).
Of course, you need some time to get familiar with the uC, but starter kits always deliver good tutorials and quick-start examples.
Just an idea...
Regards
05-19-2010 11:10 AM
Grateful for ideas,
..but my task is to create VI which would control a device (device for biomedical research) and generate TTL pulses through parallel port. I understand that likely never get a 50 us pulse. The goal is to get it as possible close to it.About the project… Generate 8 TTL pulses. One master mode: width of pulse t=40us…4000s, Period T=50us…3600s and 7 slave modes.
Slave:
1 1) When the signal generator in Master mode is operating, the signal generator in Slave mode should be synchronized to the Master. If signal generator in Master mode shuts down, the signal generator in Slave mode will stop to operate. If the Master unit is turned back on, the Slave unit will resume synchronization.
2 2) Adjustable time-out while generated pulses start. deltaT=50us…3600s.
3 3) Pulse width t=40us…3600s
4 4) Period T=20us… up to full
Please, look attached picture.
sorry if my English is not perfect 🙂
05-19-2010 04:50 PM
You're not going to get anywhere close to what you want by trying to use the parallel port, but you're more than welcome to try just to prove it to yourself.
To control the parallel port you must write a full byte. There's an example that ships with LabVIEW on how to control the parallel port lines. Open the Example Finder and seach for "parallel" and open the "Parallel Port Read and Write Loop" example.