Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing pulses on parallel-port

I tried to build a stepmotordriver via parallel port.The pulses I create by using port_write should come every 6 msecs. The pulses I see on the scope come to parallel port every 6 +/- 2 msec (on win98 with Pentium 200MHz). Is it possibel to reduce this timing problem?
0 Kudos
Message 1 of 3
(3,017 Views)
Johann,
I have been looking into your issue, and I have a few suggestions that may help. I am not sure exactly what platform you are programming, but I would suggest setting this protion of your program to a higher priority if possible. For instance, in LabVIEW, under the VI Properties, you can specify several levels of execution priority to help improve the softwares execution. However, this still may leave some complications with how Windows will send data across the port. For this, I have found an instance where a customer claims to have found a way to modify the system.ini file in Windows 3.1 to improve performance. I realize you are working in 98, but the files appear somewhat similar and you may be able to modify yours accordingly. The following is the suggestio
n:
"...the timer between the bytes varied from 15ms to greater than 60ms. I think this is because LabVIEW was accurately timing the write operation but this was only to the serial port ouput queue. It was WIndows that was writing the bytes out by taking them off the queue, so we had no control over it.

After consulting with some his colleagues he has told me that the following mods to SYSTEM.INI allows LV to time the bytes more accurately, certainly within his requirements. The mods are:

in [386Enh] add a line
TRAPTIMERPORTS=Off

and comment out the line
device=*combuff

" I have not verified if this works, but I thought it was a suggestion you may want to be aware of and try with your system.

Best Regards,
Chris D
0 Kudos
Message 2 of 3
(3,017 Views)
The change in "System.ini" did the trick.Now it works fine, thanks a lot
0 Kudos
Message 3 of 3
(3,017 Views)