Running CNC machine with stepper motors - will this work wit

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

cnccnc
Posts: 5
Joined: Mon Dec 10, 2007 8:30 pm

Running CNC machine with stepper motors - will this work wit

Post by cnccnc »

I developed software for running XYZ cnc machine (like plotter) through parallel port. We use stepper motors to drive machine.

Software work fine on win98 and win2000, but with WinXP machine movement are not so smooth like win98 or win2000.

M$FT is not supporting win98 and we are having problems to find computers.
Now we use used computer with win98 on it. But what in the future??


Why it dosenot work with winXP and will it work with REACTOS?

I guess WinXP is doing something 20 times a second, and that is what make problems for smooth running.
Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Post by Z98 »

So this is a driver, correct?
User avatar
betaluva
Posts: 424
Joined: Tue Dec 14, 2004 1:33 am
Location: Australia
Contact:

Post by betaluva »

it sounds like a application to me? anyways theres only one way to find out , download the bootcd iso and install reactos on real hardware/vmware/virtualbox and then install your application.
cnccnc
Posts: 5
Joined: Mon Dec 10, 2007 8:30 pm

It is an application

Post by cnccnc »

I use inpout32.dll to read a write to paralell port:
http://logix4u.net/Legacy_Ports/Parallel_Port.html

But something else must be a problem. I dont know much about OS.

For moving stepper motor throug printer port timing is important, and I guess some XP processes in the background is making problems.

It works fine and smooth with 98 and win2000 but with XP it works but it is not smooth
w3seek
Developer
Posts: 144
Joined: Tue Nov 23, 2004 12:12 am

Post by w3seek »

Since timing is crucial in your application you might want to consider increasing it's priority. Also you should not perform the I/O in a thread servicing the GUI of your application, consider moving that code to a separate thread (with higher priority).
cnccnc
Posts: 5
Joined: Mon Dec 10, 2007 8:30 pm

I did it

Post by cnccnc »

I put thread into real mode priority. It works better, but not good as with win2000.
GreatLord
Developer
Posts: 926
Joined: Tue Nov 30, 2004 10:26 am
Location: Sweden

Post by GreatLord »

windows nt parellport have a delay buildin to 10ms
I have not my self found a way around it in user mode apps. only with a kmode drv.
playjam
Posts: 7
Joined: Mon Oct 01, 2007 11:04 am

Post by playjam »

GreatLord wrote:windows nt parellport have a delay buildin to 10ms
I have not my self found a way around it in user mode apps. only with a kmode drv.
By calling
timeBeginPeriod(1);
you can get the timer down to 1ms (depends on motherboard though).

Use
TIMECAPS resolution;
timeGetDevCaps(&resolution, sizeof (TIMECAPS));
to check.
cnccnc
Posts: 5
Joined: Mon Dec 10, 2007 8:30 pm

side effects

Post by cnccnc »

This has a number of side effects - it increases the responsiveness of the system to periodic events (when event timeouts occur at a higher resolution, they expire closer to their intended time). But that increased responsiveness comes at a cost - since the system scheduler is running more often, the system spends more time scheduling tasks, context switching, etc. This can ultimately reduce overall system performance, since every clock cycle the system is processing "system stuff" is a clock cycle that isn't being spent running your application. For some multimedia applications (video, for example) the increased system responsiveness is worth the system overhead (for instance, if you're interested in very low latency audio or video, you need the system timers to run at a high frequency).
============================================
MY PROGRAM WORKS FINE ON WIN2000 - PROBLEM IS WITH WINXP

I will stick to win2000 (gave up fixing problem with XP)

JUST wondering how it will work with REACTOS.
REACTOS is not RTOS,
playjam
Posts: 7
Joined: Mon Oct 01, 2007 11:04 am

Re: side effects

Post by playjam »

cnccnc wrote:This has a number of side effects (...)
The side effects you quoted sound quite scary when indeed I did not find them to be that noticeable (or did you set the process priority up too?). I used this little trick in production test software to speed up the I2C programming (test time = $).

If 2000 works I'd also suggest not bothering with XP.
Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Post by Haos »

Yeah... not that there are more PCs with XP than with 2k...
cppm
Posts: 289
Joined: Wed May 02, 2007 10:03 pm

Post by cppm »

JUST wondering how it will work with REACTOS.
REACTOS is not RTOS,
Since the reasons for the problem is still a mystery, no-one can tell, the best answer will come from testing it yourself. and btw I should imagine that 'rtos' is one of many abbreviations for reactos, no harm in that.

Working on the assumption that it's something in the background interfering I suppose you've tried shutting down as many of the background services as you can and seeing if you can isolate a particular daemon, sorry "service" :p that might be causing the problem.

Another thing, if your program is doing anything that might invoke a compatibility shim, then that might do spooky stuff, but I don't know anything about that, so it's a stab in the dark.

If none of the above then that'd probably be a systematic problem with XP, and being closed source then there's nought you can do about it, enjoy.

PS: It would be interesting if the problem is present in Vista, I would bet on it.
Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Post by Z98 »

RTOS actually means real time operating system.
cnccnc
Posts: 5
Joined: Mon Dec 10, 2007 8:30 pm

I will be OK for next few years

Post by cnccnc »

I will be OK for next few years cause it will be easy to find PC with WIN2000.
M$FT will support win 2000 till 2010. What I can do after? Can I legally make a copies of software that is not supported.
I am willing to pay, that is not a problem, but they are not selling.
And my business depends on it!
========================================
I started to develop external board with PIC processor so I will comunicate throuh USB, but all timing will be outside of the PC ...

But, anyway it is a question for REACTOS team. Can you make it works RTOS (Real Time OS) like WINCE or WINXP embedded. It is important.
Motion control, robotics need that!

http://www.kickas88smachinesinc.com/photose.htm
Copy and paste link but remove 88
linuxgx
Posts: 170
Joined: Wed Mar 29, 2006 4:18 pm

Post by linuxgx »

CNC, I'm currently doing some drafting on the side and iv gone out of the way to install Reactos on our plotter so that we can free up a 2000 license for one of our drafting boxes. The plotter has its own server software and side pc. If you have a net bassed plotter you should have no problem. Just install the software that came with the plotter into reactOS. Personaly our server is more stable since the switch. It used to crash all the time dew to crossed packets on the network. Its poorly poorly coded, but I dont have the strength to try and install linux on the dam thing and rewrite the server. So for now reactOS will do just fine.

I need to find a legal way of getting Autocad to run on ReactOS. Sigh! So I can burn my NT 2000 Licenses.
Dam corporations that don't support Linux!!!

P.S. You don't happen to work for John Crane By chance do you?
Post Reply

Who is online

Users browsing this forum: No registered users and 45 guests