plugin - contour shuttle Xpress

This is where you talk about Plugins. How they are made and how they work, show examples.

plugin - contour shuttle Xpress

Postby Robertspark » Sat Sep 03, 2016 10:38 pm

Hello,

First off, thanks for setting up the new forum

trying to set up a plugin for the Contour Shuttle Xpresshttp://ergo.contourdesign.com/UK/product/shuttlexpress/ and then hopefully port it to the Shuttle Prohttp://ergo.contourdesign.com/UK/product/shuttlepro-v2/ (i've got both).

attached is the sourcecode and the current plugin

The problem I'm having is with the inner jog wheel, and I'm sure its me as I'm new to c sharp, done a bit of other coding but am by no means proficient in code (day job does not involve code).

Basically the usb outputs a byte array, and position 2 in the stack provides the output of the inner jog wheel which is output as a byte and increments for each position jog increment of the inner jog wheel from 0-254, as the inner jog wheel has 12 positions for 1 revolution, there are around 22 revolutions before the jog wheel rolls over. Hence I've been trying to deal with the rollover first. I've tried two approaches and the current bit of code seems to work ok, but if I jog the inner jog wheel fast uccnc crashes, but this may be because the byte array is increasing too quickly.

As can be seen from the code, I've used StreamReader / Writer to store the default 5 buttons within a text file which can be located in the plugins folder.

The button presses and the external rapid jog wheel work fine in my code, it was just the last but that was not at the moment, I've got a plan to change the outer code a little to allow for linear, squared and cubed rapid jog motion but I was just going to get the basic stuff sorted first.

I've not given up with it yet, but someone will probably see the error of my ways right away. Think we probably need a few more plugin examples included with the code as I'm sure that there are other ways of dealing with this.

Rob
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: plugin - contour shuttle Xpress

Postby Robertspark » Sat Sep 03, 2016 11:45 pm

... sorry code is over here + the plugin (the forum doesn't like dll's, txt files or zipped folders over 254/256kb....)

https://drive.google.com/folderview?id=0B9eqGqWQVBbWRW03Zk1saVJESnc&usp=sharing

Rob
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: plugin - contour shuttle Xpress

Postby cncdrive » Sun Sep 04, 2016 12:58 am

Rob,

Thanks for your post.

If the UCCNC "crashes" from the plugin then to get to the bottom of the issue I advice you to use Try/Catch around your code parts,
so you could catch the exception and then you can study where the exception occurs and what the exception text is,
so you can get an idea about which code and why is causing the exception.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: plugin - contour shuttle Xpress

Postby Robertspark » Sun Sep 04, 2016 11:39 am

thanks very much for the advice, I learnt something else new with using try, catch and messagebox

all the buttons rapid jog and incremental jog are working, and I've updated the files on the google drive link

few things to sort are:
1) incremental jog (centre) wheel can miss steps if jogged very fast (problem is related to jog speed, see item 2)
2) rapid jog speed, initial jog speed setting (field 913) not being reset after rapid jog (i.e. stays at 10%)
3) rapid jog (outer) wheel currently only one jog rate 100,75,50,40,20,10,5, would like linear, squared and cubic
4) port over to shuttle Pro

couple of things which may be of use to others.....

in case you did not know usb devices have a VID (vendor ID) and PID (Product ID), all contour products use a VID of 0B33 and a PID of 0020 for the Xpress and 0030 for the Pro
numbers were obtained from here: http://www.machsupport.com/wp-content/uploads/2013/04/ShuttleProInstallation.pdf

I used this library if you want to cal it that for the USB access:
http://www.codeproject.com/Tips/530836/Csharp-USB-HID-Interface

And at the bottom of the page is a "USB2550HidTest.zip" file containing the sourcecode that I found very useful to extract the inputs from the Shuttle Xpress, so I could see where the bytes outputs where being located at what positions in the output array. [you'll need to change the PID & VID to your selected product that you're trying to interface]

Rob
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: plugin - contour shuttle Xpress

Postby Robertspark » Wed Sep 14, 2016 4:43 pm

Could an administrator kindly move this thread across to the plugins section please,

Thanks
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: plugin - contour shuttle Xpress

Postby Rikk » Tue Jan 24, 2017 1:05 pm

Hi Robert did you get any further with this? Just looking for a cheap job pendant and this seems to fit the bill.

Thanks
Rikk
 
Posts: 12
Joined: Sun Jan 01, 2017 9:58 pm

Re: plugin - contour shuttle Xpress

Postby Robertspark » Wed Jan 25, 2017 11:10 am

No, not got any further (doing other things at present, non cnc).

If you want a cheap pendant you can't really get any better + cheaper than the XHC HB04, which has a fully working plugin for UCCNC + Mach3 and I suspect Mach4 too.

Personally I prefer the USB one (less interference potential than wireless in a workshop environment + no need for battery changes).

They can be got for about £50 direct from china with free shipping, but note that china is kind of in shutdown now with Chinese new year until the 5th February (2017) for shipping stuff out, hence a little longer lead times on deliveries.

eg: ebay auction no: 261868902355 , note its £47 + £15 postage, the £15 postage has been added in the last few months / weeks as I suspect that it's because the £ has devalued ~20% against USD and the seller has noticed it only more reciently, it use to be free delivery, I'd search through ebay.com or ebay.ca, ebay.com.au etc as some listings don't show up in other countries despite the listing being for world wide shipping as one of those will have a cheaper XHB HB04 available in whatever currency you want + you may be able to benefit from with currency variances at the moment (sort of arbitrage... if you sell it on...).

I would not go with a contour shuttle Xpress or Shuttle Pro now, as purpose built MPG's are now available at lower cost. When the Shuttle Pro / XPress was done for Mach3 the HB04 was over £120 and I've slowly watched it drop over the years.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: plugin - contour shuttle Xpress

Postby Rikk » Wed Jan 25, 2017 3:32 pm

Thanks for the reply, I'll look at ordering a HB04 then as that's already good to go :)
Rikk
 
Posts: 12
Joined: Sun Jan 01, 2017 9:58 pm

Re: plugin - contour shuttle Xpress

Postby cncdrive » Wed Jan 25, 2017 5:28 pm

Also there is the VistaCNC imach pendant: https://youtu.be/-1pboS4GFE0?t=87
And our UCR200 pendant: http://www.cncdrive.com/UCR200.html
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm


Return to Plugins

Who is online

Users browsing this forum: No registered users and 8 guests