LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Performance drop from Windows 7 to XP

Solved!
Go to solution

Hello everyone,

I have a problem with an simple VI, which controls a stepping motor.
At my programming laptop (Windows 7) the motor runs smooth and almost silent, but with different PCs (all Windows XP) the delay between the steps is so high, that the motor rattles and does not drive to the right position.

I tried different delay times and it sounds similar to ca. 6ms between every step.

Motorsteuerung.JPG

The processor clock frequency of the laptop and PC is nearly the same and the usage of the CPU doesn't exceed 10%.

I use LV2010.
It would nice to hear any opinions or suggestions.


Greetings Lucas

0 Kudos
Message 1 of 10
(4,046 Views)

What DAQ are you using?  It seems to me that you should be using a counter instead.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 10
(4,033 Views)

If you're having problems that essentially seem to relate to an inability to run a loop sufficiently fast, in this case you might consider using a Sample Clock and writing multiple samples at once.

 

That would allow the loop to run much less quickly, and still maintain the same output over time.

 

What is the roll of the DAQmx Write vs the DAQ Assistant node?


GCentral
0 Kudos
Message 3 of 10
(4,019 Views)
Solution
Accepted by topic author LucasWolf

1. What DAQ device do you have?  A counter pulse train (hardware-timed) would be a MUCH better option than your digital bit toggling (software-timed).

 

2. I recall that time-of-day queries under XP were quantized to something like 15.7 msec.  By Windows 7, the resolution was 1 msec (or maybe finer?).

   This is a separate thing from your wait timer, but it makes me wonder if XP itself has some timing limitations. (My recollection is that the minimum wait interval was 2 msec even if you requested 1 msec.  It's possible though that this wasn't the default XP behavior and this resolution got configured while installing LabVIEW and other NI stuff.   All this is highly speculative though.)

 

3. A third possibility might be that you're using a USB device.  Maybe XP machines use a slower 1.1 port?   Perhaps the DAQmx driver version on the XP machines is less optimized for low latency when compared to the Win 7 one?

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 4 of 10
(4,016 Views)

Thank you for your help,

The USB-6501 is used, thats the problem.
Because of the DAQ device I can't use a sample clock or power train.
EDIT:
The DAQ Assistand the direction of the motor.
The DAQmxWrite is for the steps of the motor.

0 Kudos
Message 5 of 10
(3,933 Views)

Hmm... That's an unfortunate development.

 

For motor control, I suspect (especially if you need pulsing at 500Hz) that you'd be much better off trying to get hold of (beg, borrow, steal, buy etc) something with a hardware timer and perhaps digital regeneration.

 

Otherwise, controlling the rate is dependent on all sorts of things that you can't easily regulate - your motor will change speed depending on how busy your PC is, etc.

And, apparently, your older OS...


GCentral
0 Kudos
Message 6 of 10
(3,917 Views)

It is 2020.  Why are you still using Windows XP?

Even Windows 7 just became obsolete when Microsoft ended support for it last month.

0 Kudos
Message 7 of 10
(3,912 Views)

@cbutcher: Yes, I also think, that I have to use another DAQ device, anywhere here should lay some old PCI Cards 😄

 

@RavensFan: I'm doing an Internship in an Optic Lab and they are using very old machins with old PCs. Which are custom build 10-20 years ago, and everybody in the company just uses this stuff til it breaks. Unfortunately they ask me now to repair their stuff, which is badly constructed and uses poorly written LV code.



 

Message 8 of 10
(3,901 Views)

ok, I'm now using a PCI 6052E and a counter pulse train, everything works fine.

 

But here a some informations from a test I made:
With the old programm (bit toggling) the motor ran a little bit faster but not much.
So I think Kevin Princes second point is right, under XP the minimal wait interval is more than 1 msec even if you request 1 msec.

 

Thank you for your help

0 Kudos
Message 9 of 10
(3,847 Views)

I had a similar issue once, and i ended up using the AO port instead and create a sqare wave signal 'sampled' at 10KHz that i played instead. In my case it was a single pulse where i used the 'sampling' speed for precision, but i had no Counter since i also used a USB DAQ.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 10
(3,826 Views)