Tiny Computer with Printer port

More
03 Aug 2012 16:38 - 04 Aug 2012 10:55 #22727 by ArcEye
Hi JT

I can't read the numbers well for jitter but servo is 6x,xxx and base is 2x,xxx after a few minutes.

Yeah the figures aren't as good as one might hope, the best figures are still with the original 2.6.24 kernel.
Now that you have managed to boot 8.04, try upgrading the EMC2 2.3 to Linuxcnc 2.5 with the packages in the alternate method
That gives the best latency for me - just no internet

So to run it you have to be su root?

No that was just to install because I wanted to do things to files in /etc/udev and much more and it is just easier to run as root.
You can su root, then chown the whole RIP to your user account if you want, or put yourself in the root user group.

So I'm guessing it is not possible to just have a desktop launcher for this?

Not for a RIP installation because it is reliant upon a per terminal session instance of an environment, to ensure that all links and paths point into the build.

If you were happy with the build and the kernel, you could re-build Linuxcnc again with a ./configure --prefix=/usr and it would install onto the system and the shortcuts and menu would work.

Again I would suggest that you upgrade the packages for Linuxcnc that are built against the 2.6.24 kernel.
Then you can run that kernel and still run 2.5 from a shortcut or whatever.

If you want you can do the upgrade as your user name and insert sudo in front of everything, because unlike the automated script, you have to do everything yourself from the command line anyway.

Glad you got 8.04 to run at last, worth the extra push to upgrade the original EMC install

regards
Last edit: 04 Aug 2012 10:55 by ArcEye.

Please Log in or Create an account to join the conversation.

More
08 Aug 2012 11:51 - 08 Sep 2012 12:57 #22973 by ArcEye
Finally got time to test the NCBOX in the workshop.

Was completely undramatic and just worked.

I had to change the config for parport address and edit out some references to a second parport, but other than that I just unplugged cables from the existing computer and plugged them into the NCBOX.

Interestingly I ended up using the 2.6.30-vortex86mx-rtai kernel that I had compiled.
This was not intentional, I just happened to have the development CF card inserted and hadn't realised.

It ran a config where the base thread was set to 35000 without a single realtime error.
Looks like it is a viable contender after all, if internet access is important.

The machine was a Denford Easimill ( a medium sized turret knee mill with Nema 34 steppers on all axes) and the task was quite heavy flycutting of a 100mm x 200mm steel plate.
It ran a config tuned to a computer with a 9300 base thread without error during the program.

I did take a video, but the quality wasn't good and at the end of the day it just shows a machine working, I get bored s***less watching some of the videos on youtube, so won't inflict the same on others.

Overall thoughts.

Came well packaged.
The box is a pressed steel with a die-cast alloy heat sink top. A lot squeezed into a small space, is approx 4" square by 1.5" deep.
Whilst pretty robust, it is not splash proof and needs to be mounted accordingly
4 mounting holes and machine screws are provided at 100mm centres.

Boots quickly from the CF card and can boot from USB stick or external USB device (DVD-ROM - not tried a USB HDD)
There is an option to boot from Pxe (network) in BIOS but not tried

In common with many older type chips (the chip instruction set is essentially i486/i586) it does not run well with Ubuntu 10.04, but runs well with Ubuntu 8.04 and the latest Linuxcnc version.
With the kernel and Linuxcnc upgrades sorted out, there is nothing much more to do.

There is a GPIO (General Purpose I/O) port on the front and for complete usability an adaptor plug and possibly a parport socket would be required for additional I/O

It is just a pretty capable computer with an incredibly small footprint, allowing mounting within a control cabinet, or on the back of a monitor even.

Could be just the ticket for a limited space project
Last edit: 08 Sep 2012 12:57 by ArcEye.

Please Log in or Create an account to join the conversation.

More
08 Sep 2012 12:11 - 08 Sep 2012 12:12 #24064 by ArcEye
Update time

Anthony sent me a hal component to access the GPIO header on the NCBOX and I have just had time to test it.

The NCBOX has a 26 pin header.
First pin on each row is power - +5v top and GND below and the rest of the 24 IO pins are divided into 3 x 8 pin virtual ports. (VP00 VP01 VP03)
The defaults for these pins can be programmed in BIOS, but standard is default to Input.

The component, hal_mxgpio.c compiled and installed without issue.
It is loaded and configured from the load_rt line in the .hal file

loadrt hal_mxgpio cfg="VP00 0x00"
for example loads the module, with Virtual port 00 activated and all bits set to 0, which is input.

To set all bits to output you would use cfg="VP00 0xFF", because 0xFF is the hexi-decimal encapsulation of binary 11111111, ie all bits set to 1
and so forth for all possible values in between.

The sample config supplied by Anthony used the GPIO to completely replace parport.0
Whilst a good demonstration of what it was capable of, I would never waste the IO setting it to the same as I could get from a parport, so I used it as a second port

To test it, I made up a 26 pin plug by cutting down an IDE ribbon cable and then connected to a parport plug, matching the existing pinouts for my MPG pendant on my big mill.

Assignments in my mpg.hal file were made as below, the syntax is just the same as a parport

net scale1 mux4.0.sel0 <= mxgpio.0.pin-04-in

net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale

net mpg-a encoder.1.phase-A <= mxgpio.0.pin-05-in
net mpg-b encoder.1.phase-B <= mxgpio.0.pin-06-in

net mpg-x axis.0.jog-enable <= mxgpio.0.pin-00-in-not
net mpg-y axis.1.jog-enable <= mxgpio.0.pin-01-in-not
net mpg-z axis.2.jog-enable <= mxgpio.0.pin-02-in-not
net mpg-4 axis.3.jog-enable <= mxgpio.0.pin-03-in-not

Tested and it just worked!

The 24 pin GPIO has great potential and should satisfy most IO requirements for stepper machines, allowing many more
input pins than a second parport would

Yet again the NCBOX has proved itself a good performer.

The only minor problem I have had, is regards parport voltage, which in common with most newer ports I suspect is 3.3V.
I have some long parport cables going through an old printer switch hub to allow one computer to easily switch between 2 machines.
This works fine with a 5V port but I had to plug directly into the relevant machine when using the NCBOX, having done so however it functioned perfectly.



regards
Attachments:
Last edit: 08 Sep 2012 12:12 by ArcEye.

Please Log in or Create an account to join the conversation.

More
08 Sep 2012 13:25 - 08 Sep 2012 13:27 #24067 by ArcEye
And this is the GPIO layout
Attachments:
Last edit: 08 Sep 2012 13:27 by ArcEye.

Please Log in or Create an account to join the conversation.

More
08 Sep 2012 13:44 #24068 by BigJohnT
Having all that extra I/O is a pretty big bonus... I might have to try and get mine to work again...

John

Please Log in or Create an account to join the conversation.

More
09 Sep 2012 10:25 #24090 by andypugh
ArcEye wrote:

And this is the GPIO layout

A small niggle, but I think I would have presented it to HAL all as one port with pins 0 to 23 and a set of "is-output" parameters.

Please Log in or Create an account to join the conversation.

More
09 Sep 2012 13:52 #24096 by ArcEye

think I would have presented it to HAL all as one port with pins 0 to 23 and a set of "is-output" parameters.

Yes, it does seem a bit strange, the setup into 8 bit ports is in BIOS and for some reason GP02 is disabled, so even the port numbers don't run consequentially.

DMP's main business is robotics, so it may be something to do with their requirements for that.

Please Log in or Create an account to join the conversation.

More
08 Nov 2012 11:52 - 09 Nov 2012 11:13 #26359 by lucrece_lu
NCBOX supports 16-channel hardware PWM generators (32-bit generator in
resolution 20ns) on its GPIO connector; that is, every pin on GPIO0 and GPIO1
can switch into hardware PWM mode to send high-resolution PWM pulses with
customized period and duty.

the attached is sample code for LinuxCNC who interesting
Last edit: 09 Nov 2012 11:13 by lucrece_lu.

Please Log in or Create an account to join the conversation.

More
08 Nov 2012 20:28 #26369 by andypugh

every pin on GPIO0 and GPIO1
can switch into hardware PWM mode to send high-resolution PWM pulses with
customized period and duty..

Now that does sound like quite a useful trick.
Unfortunately the file didn't come through. What format was it?

Assuming that the pins on each port share a PWM clock, I guess that means that they stay in phase and could produce 3-phase output for driving motor power drivers?

Please Log in or Create an account to join the conversation.

More
09 Nov 2012 16:14 - 01 Jul 2013 15:35 #26400 by ArcEye
Anthony couldn't get the file uploaded, so he mailed it to me

Here it is, haven't had a chance to study it, off out for the day

regards


OK we have a problem with attachments, tried 3 times to attach, changed the name in case it does not like '-' separated names

Each time no error message but does not attach the file.

The file size is 773138, is that too large for a zip?

Yep, removed the large .png from the zip and it attaches, would be nice to have some kind of error though.

EDIT

Removed original zip. The below has all the PWM and GPIO files except the .png which is on next page


File Attachment:

File Name: NCBOX_PWM_GPIO.zip
File Size:274 KB
Attachments:
Last edit: 01 Jul 2013 15:35 by ArcEye.

Please Log in or Create an account to join the conversation.

Time to create page: 0.248 seconds
Powered by Kunena Forum