Welcome, Guest. Please login or register.

Author Topic: Amiga One X 1000 and Xena/Xorro  (Read 15831 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Hans_

Re: Amiga One X 1000 and Xena/Xorro
« on: July 05, 2014, 01:19:43 AM »
@Dandy

I made two suggestions a while back.

1. The first was to use it for CNC machine control for manufacturing stuff (whether that's in a factory, or someone's garage). CNC machine control requires very precise timing and simutaneous control of multiple stepper motors. I've heard of trouble when using PCs for this task, where the OS mucks up the timing and causes manufacturing defects. This is with the CNC machine's stepper motors being controlled by bitbanging an old fashioned parallel port. Xena/Xorro would have a few advantages. Firstly, it should be able to drive multiple stepper motors simultaneously than a parallel port. Secondly, the CPU has very very low latency when sending data/commands (no drivers, USB controllers/buses or other things in the way). Finally, AmigaOS' multitasking should be able to meet the hard realtime requirements, even though it isn't a "realtime multitasking" OS.

2. The other suggestion that I had was to use it as a "super debug port." One problem that I have with debugging drivers, is that I have to output debug data to the serial port (if the graphics driver crashes, then you won't be able to see/save it to disk). The serial port is painfully slow when there's a lot of debug info. My idea would be to stream the debug data via Xena at high speed, and have it write that data to log files on a SD-card (a high-speed one, like you would use in a camera). After a crash, the debug data could be retrieved and read directly from the SD-card via Xena. This would both speed up the debugging, and eliminate the need for a serial cable and second PC.

Why not stream it to disk via the OS? Well, an OS crash could prevent the (often critical) last few bytes from making it onto the disk. With Xena handling the writes, every last byte will safely end up on the SD-card.

Why haven't I done either of these? I simply don't have the time right now.

Hans
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
 

Offline Hans_

Re: Amiga One X 1000 and Xena/Xorro
« Reply #1 on: July 05, 2014, 11:00:40 AM »
@Thorham
Quote from: Thorham;768247
Don't count on it.

As far as non-realtime desktop OSes go, AmigaOS has a nice and simple scheduler, low switching times, and it's not going to suddenly go off and do maintenance tasks in the background... unless I tell it to. That does make meeting the timing requirements easier. Simply setting the task priority for my CNC task higher than most other tasks should do it.**


Quote from: Thorham;768247
It's indeed not, and therefore unreliable for certain real time applications.

Want to do real time 'stuff'? Use a real time OS and don't mess around (right tool for the job).

Thanks for stating the obvious. Now go and tell everyone who uses PCs for control purposes.*** Be sure to also remind them that for some real-time tasks they should ditch the OS altogether, and use a hard-coded loop...

Hans


** I guess that I should add disclaimers and qualifiers here to avoid another snarky reply. Whether or not it will reliably handle a real-time task does, of course, depend on the processing power required, what the timing tolerances are, etc.

*** In some cases, I think that the decision to use PCs instead of PLCs for control may have been influenced by the fact that the PC comes with Solitaire installed. :D
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
 

Offline Hans_

Re: Amiga One X 1000 and Xena/Xorro
« Reply #2 on: July 05, 2014, 09:58:38 PM »
@Jeff

Relax. Thorham found one item that he could nit-pick on. While he's busy lecturing me on the right way to do real-time computing, I know that there are many CNC machines out there that run on various versions of Windows (the desktop version, not some special real-time one). Mach 3 is software that you can use for this purpose. So, I have no doubt that a Xorro based CNC controller could work, and work well. I'd even dare to try run a full feedback control loop with sensors and everything.

Of course, he is right that this wouldn't be good enough for "certain real-time applications," but I already knew that.

Hans
« Last Edit: July 05, 2014, 10:03:46 PM by Hans_ »
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
 

Offline Hans_

Re: Amiga One X 1000 and Xena/Xorro
« Reply #3 on: July 05, 2014, 10:23:13 PM »
@Dandy

I just tracked down the developer wiki page for Xena/Xorro; it's here. I thought that I had seen more "getting started" info elsewhere, but I can't remember where. Maybe it was in the dev-tools archive. Anyway, on that wiki page Lyle posts the beginnings of a Xena/Xorro serial logger that connects to the serial port.

To see more done with Xena/Xorro, we need more people/developers to ask "what could I make this do?"

Of course, it would also help if we had more docs, tutorials, and a full dev-kit including compiler that ran on AmigaOS.

Hans
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
 

Offline Hans_

Re: Amiga One X 1000 and Xena/Xorro
« Reply #4 on: July 05, 2014, 10:42:51 PM »
Quote from: Kronos;768293
Controlling a CNC machine suggest a commercial application, which pretty much rules out the use of an obscure piece of overpriced HW with no support in this field running an OS ill-fitted for the task at hand. Pointing out something that obvious is a much "constructive" as critism can get when the orginal idea is weak as this one.

You seem to have missed the post directly above yours...

If I were running a commercial manufacturing plant, then I'd buy ready made machines that were designed for the task. However, hobbyists also use CNC machines, and even build them themselves. I have a set of stepper motors and (untested) motor controller boards (soldered by me) in a drawer that are intended for such a machine. That project's on hold right now (no time), but whether some other hardware/OS would be "better" in your eyes is irrelevant.

I could apply your reasoning to pretty much everything: Why would I use AmigaOS/MorphOS/AROS/C64 for X when Windows/Linux/Some-Industrial-PC already does it so well? X could be anything from web-browsing to gaming and beyond.

Why? Because I feel like it; I enjoy it; it's fun.

Hans
« Last Edit: July 05, 2014, 10:44:56 PM by Hans_ »
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
 

Offline Hans_

Re: Amiga One X 1000 and Xena/Xorro
« Reply #5 on: July 06, 2014, 02:08:36 AM »
Quote from: Thorham;768304
If you're running your own software, you could adapt it to turn the OS off. Don't know how easy that is with AOS4+ (same for turning it back on), but it's what I'd do with AOS1/2/3.

Anyway, my first post wasn't intended to be negative. Perhaps the tone was wrong?


No worries.

Using a "classic" Amiga as a CNC controller would be pretty neat too. If anyone does this, I expect photos and videos to be posted!

Hans
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
 

Offline Hans_

Re: Amiga One X 1000 and Xena/Xorro
« Reply #6 on: July 07, 2014, 12:14:29 AM »
Quote from: Boot_WB;768333
@Hans

RE CNC - I can see your point as a hobbyist idea (it _could_ be done) but what kind of CNC are you considering that needs such low latency feedback from the sensors to control stepping motor functions?
My comment about feedback control loops wasn't really about CNC. That was in response to the "you can't do real-time" comments from Thorham. Like you said, you usually don't really need such control with stepper motors. There are a few cases where it might be needed. For example, you might be machining something that need your tool to apply constant pressure.

Now, I don't have a specific application in mind beyond a desktop milling machine. I bought the motors before the A1-X1000 came out, and my plan back then was to get the computer to turn the g-code into a set of stepper motor bit-streams, and upload that via wifi to a small ARM controller board. That board would store it on an SD-card, and spit it out to the motors once done. However, using Xorro would be faster and more convenient.


Quote from: Boot_WB;768333
I genuinely don't see what advantage Xena/Xorro bring here, and do see disadvantages of complication. This doesn't seem to utilise Xena/Xorro much beyond (as you have observed) a parallell port.
I could drive more outputs via Xorro and read more inputs than a parallel port could. This is one of those situations where you need all motors to be perfectly synchronised, so using multiple parallel ports would not work. This is irrelevant for a 3-axis machine, but...

Another consideration is speed. With stepper motors there's a trade-off between precision and speed. If you want both high precision and reasonable speed, then you'll need to be able to generate a very high-speed pulse stream (and have motors that can keep up). I don't know what the switching limits are when you bit-bang the parallel port, nor have I checked what the speed limits of my motors are. However, I'm pretty sure that I could get Xena/Xorro to deliver a faster and more precisely timed set of pulse-streams than a parallel port could, without bringing multitasking to a halt.

Finally, let me ask you this:

Quote from: Boot_WB;768333
Perhpas something like robotics control maybe - considering a 'walking robot' that requires constant feedback for eg balance.
However like any specialist application, it's better to choose the most appropriate solution to the problem, not start with a given solution and try to fit the problem around it.

I remain confused as to what function Xena/Xorro provides that is advantageous.

I've made a few suggestions above, although I fully expect a "yes but..." reply. However, does it really matter if my CNC controller uses Xena/Xorro and the PA6T to their maximum potential? I don't think so. So much hardware and software doesn't (e.g., just think about how many games you play actually uses your computer to its full potential).

Similarly, there are myriads of microcontroller boards available out there, and you're always going to find a different board that is "at least as good" as the one that you chose. Is that any reason to cancel your project? No, it isn't.

You are too fixated on "where's the killer advantage" to even begin thinking about what you could do with it.

In the end, we have a CPU with high processing power coupled (via a low-latency interface) to a device that excels in things such as custom application-specific I/O, motor control, etc. I find that idea interesting. Plus, I like seeing what I can make things do, irrespective of what other people say it's predefined purpose is (e.g., 3D graphics with 2D compositing).

I really hope that people will think a bit more creatively about what they could use it for, and be less quick to look for reasons why those ideas are "stupid." You might just find a few good/interesting ideas amongst the "silly" ones.

Hans
« Last Edit: July 07, 2014, 12:20:24 AM by Hans_ »
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
 

Offline Hans_

Re: Amiga One X 1000 and Xena/Xorro
« Reply #7 on: July 07, 2014, 12:18:14 AM »
Quote from: persia;768318
Just curious why would a home hobbyist use a CNC rather than a 3D printer?


Kronos already gave a good answer, to illustrate this further: Try to make a set of gears out of metal that work properly with your desktop 3D printer. :p

There are very expensive industrial 3D printers that could do it but, AFAIK, the cogs wouldn't be as strong or as smooth as when manufactured using more traditional methods.

3D printers are great, but I can think of a long list of things that they aren't suitable for.

Hans
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
 

Offline Hans_

Re: Amiga One X 1000 and Xena/Xorro
« Reply #8 on: July 14, 2014, 10:57:06 PM »
Quote from: LyleHaze;768945
About adding DB connectors to the Xorro board, that is possible, but I would discourage it. Perhaps I am overly cautious, but anything I connect that comes outside of the case will be optically isolated. While this may be overkill, I think it a prudent choice. I have an SD card there now, no need for isolation. I have a MAX3232 chip, which is connected to the serial port inside the case. again, no need for isolation there. But anything that comes outside the case, for joysticks or whatever else, will be isolated on my machine, and I would suggest that others consider it as well.


If I did have time for my CNC controller idea, then the first thing that I'd do would be to design a bidirectional opto-isolation board. IIRC, the stepper motor controllers use up to 60V input,** and I definitely don't want that voltage level (or back-emf from the motors) finding its way into my machine.

Hans


** NOTE: The motors themselves are much lower voltage, but the driver chips benefit from having a high voltage at their input.
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.