Getting feedback from digital caliper?

More
04 Sep 2011 07:43 #12947 by yaqwsx
Hello,
I'm new to the whole EMC Linux and I have a few questions. I want to build my own hobby CNC. I don't like using stepper motors without any feedback. I have got few old digital calipers with data output. I'd like to use them, but I have no clue how to set up EMC. I've read wiki and documentation, but there's nothing. At least I haven't found it.
My idea is that I need MCU which reads data on serial line from caliper and sends them on parallel port to PC.

Is possible to use caliper as feedback for EMC?

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

More
04 Sep 2011 08:06 - 04 Sep 2011 08:13 #12948 by cncbasher
their are many articles on the web for conversion of the caliper data to RS232 , so obtaining the data should not be too difficult ( i have seen both for use with pic or arduino )
although thier are different BCD protocols in use depending on the make of caliper , chinese scale protocol & digimatic ( digimatic are unique to their own but it is documented )

although i would think that some additional programming would be needed to bring them into EMC
via the serial port , i doubt with everything else using the parrell port would not be a good idea

you may also find that they are just not robust enough to stand cnc work , fast moves for example could give wrong results as the scales cannot read fast enough to hold the position data correct
i'd suggest that you use glass scales instead
Last edit: 04 Sep 2011 08:13 by cncbasher.

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

More
04 Sep 2011 09:47 #12951 by yaqwsx
Thanks for answering me. Obtaining data or transforming of them shouldn't be a problem for me. I also don't worry about the calipers speed or data corect. It's not really a caliper, it's a gauge from an old CNC. I was thinking about parallel port because everybody on this forum says "Serial port is for real-time slow".
I think I could handle additional programing, but I haven't found any developer guide. I don't understand how is additional programming for EMC managed. Does it support some kind of plugins/API or do I have to read the source code and modify it?

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

More
04 Sep 2011 10:32 #12952 by cncbasher
if you require correct information , post the correct question ? details on the gauge would help too

chinese calipers are a serial protocol , your guage from an old cnc may not be .....
it could be a number of different types .... resolver , quadrature etc ,
so post a picture , or supply manufacture plate information or machine it came from .

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

More
04 Sep 2011 10:42 #12953 by yaqwsx
Now, when I know, that EMC does not support calipers in base my question is: How to develop custom motion controller? I've read Developer Manual, but I still don't have image how everything fits together or even if the motion controller is the part of EMC that I need to modify for using caliper. Is there better documentation than Developer Manual?

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

More
04 Sep 2011 15:36 #12960 by PCW
Without more information, its impossible to know if your "scale" is supported or not.
I use the word scale because it looks like you have a linear scale rather than a caliper

Thats why cncbasher is asking for a picture/ name plate data /etc

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

More
05 Sep 2011 00:57 #12967 by andypugh
yaqwsx wrote:

Does it support some kind of plugins/API or do I have to read the source code and modify it?


There are interfaces for a number of ways to add things to EMC2. The main one is HAL, where you have a great deal of flexibility in how you wire data sources to data users.
When HAL isn't enough you can write your own realtime components.
linuxcnc.org/docs/html/hal_comp.html

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

More
10 Sep 2011 16:53 #13087 by jpka
When i try to use one of cheap calipers from Ebay, i unfortunately found that it gives correct readouts only after it *stopped*. While move, it gives random data (or 'old' data), and read delays is different. So it need at least full replacement of controller. Another problem is it only 6 in. span, and it can't be increased easy. :-( But good news that it is really has good precision.

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

More
10 Sep 2011 17:45 #13088 by yaqwsx
I'm sory for not responding, but I had a really bussy week.
The gauge is no-name - there's nothing written (at least readable). It has a connector - Vcc, GND, SCK and SDA. After bringing clock to SCK it sends 24-bit number on SDA. It can send this number every 1-2ms. I've just tested it - it sends correct even when it's moving.
To andypugh: This seems to be good source of knowledge.

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

More
10 Sep 2011 19:01 #13089 by PCW
Looks like a SSI absolute encoder interface (though normally SSI encoders have differential clock and data for better noise immunity)

If it is SSI there's usually a minimum clock rate (50 KHz or so) and a minimum between burst gap in the clock required for framing. This interface could probably be bit-banged out a parallel port with one common clock and one input per axis for data. It would require 48 parallel port writes and 24 reads per invocation which should be OK for a 1 KHz or so servo loop but because of timing constraints it may not be practical to use a base thread (the base thread interrupting the clock burst may violate the clock timing)

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

Time to create page: 0.087 seconds
Powered by Kunena Forum