Reading Data From Digital Dial Indicator Gauge


Recommended Posts

I am designing a test system, which includes the need to measure distance at 4 points.  My prefered distance sensor is a digital dial indicator, such as that from SPI (Swiss Precision Instruments). These have a serial interface, and I can obtain a usb cable to connect it to my computer. One example is their 14-796-7.   A number of these digital dial indicators say they support SPC, but again I have been unable to find details about this data format.  Here is a link to one such device,

http://www.thetoolconnection.com/product/spi-electronic-indicator-range-0-0-500-inch_12-993-2.html

 

Aside from the serial data format, there is another question.  Since I need to get continuous readings (perhaps 1 per second), I wonder if these sorts of devices will do that.  It may be that they require the user to press a button on the device before it will send out the measurement data. But, it may also be that a request for the data can be sent over the serial interface.  In that case, the DAQFactory may be able to handle it.

 

Note that I also have the LabJack D3 data acquisiton device,which has some support for serial data, but programming it seems to be somethign that will require that I spend more time programming than I want to do.

 

Since I need multiples of the measurement device, cost is a major factor.  The link above is to one for only $110 + the cost of the cable. So, that is part of why I am attracted to the dial indicators.  The other alternative with a slender probe are the LVDT type of probes, but they seem to hundreds more... at least the ones I priced.

 

Perhaps someone can comment on the viability of DAQFActory talking to a SPI brand dial indicator.  I am also open to other measurement options.

 

Thank you,

Joe Dunfee

Link to comment
Share on other sites

Cool!  ....I am very interested in this type of data acquisition also. Will be following this thread.

Link to comment
Share on other sites

OK, found a little more info, though nothing on the swissprec site.  SPC is a protocol from Mitutoyo.  Its a three wire serial protocol.  It will NOT work in your standard RS232 port.  To read it, it appears that you need to pull the REQ line low, then look at the Data and Clk lines.  You should get 52 cycles, yielding a total of 13 characters.  D0-D3 should be 0x0F, d4 is sign (0 = positive), d5-d10 is the measurement in BCD format, bigendian, D11 is the decimal point position, and D12 the units (0 = mm, 1 = inches).  The 52 cycles come in about 34 milliseconds, so you aren't going to be able to catch it using software polled acquisition.  Instead you will need to stream the inputs from your LabJack, then pull REQ low, then wait maybe 50 milliseconds, then stop streaming.  Then you'll have to analyze the data.  Should be pretty easy.  First figure out what the clk interval is just by looking at a graph.  Then in script just search for the first change in CLK (using either Min or Max along with gettime())  That will be the first bit of D0.  Since you know the interval, you can get all the rest of the bits just by jumping by a certain time amount.  It will take a little experimenting, but you should be able to reliably tell DAQFactory you want a reading, and have it setup the LabJack, trigger the reading, and then parse the result.

 

If you'd like, I can remote into you system and help you with this, however, that sort of direct help (i.e. me doing it for you) with such a complicated protocol (compared to say, Modbus) would require a small charge for the support time.  Just email us if you are interested.

Link to comment
Share on other sites

  • 2 weeks later...

I just realized that I was not getting automatic notification of the topic replies.  Since your last post, I have continued research, and continue to be frustrated at the lack of information put out by all these indicator manufacturers.  Even contacting the dealer has not been successful. Another frustration is that many of these are available for under $100, and say they have "Data Interface" or "USB data output", but the cable to connect it is proprietary and typically costs around $150.

 

Some of the USB interfaces emulate a HID over the USB, and act like you were typing the numbers in from your keyboard.  This probably won't work for me, since I need to collect data from at least 4 of these devices. But, I know COM USB interfaces are also around, but as usual, there are no details available.

 

Here is one of the indicators I was looking at.

$84 USD, http://www.pmi-international.com/product/2101-25.html

 

Perhaps I am wanting to do something that is unusual, and so there isn't a low-cost answer out there.  It also seems like it is the same practice in regards to the sale of HDMI and USB cables at stores that sell TV's and printers. You buy the TV or printer and then they charge a very high price for the cable, knowing you are are unlikely to start shopping elsewhere to get a cable.

 

I realize you may not know of a good solution. But, perhaps another user will have come across a similar situation, and may have some ideas.

 

Thanks for any suggestions,

-Joe

Link to comment
Share on other sites

My recommendation is to find a device with a serial (RS232 or 485) or Ethernet output instead of USB.  USB just screams proprietary, where with serial / ethernet you can at least connect to the device without any proprietary drivers.  You still might have to work with a proprietary protocol, but as long as its documented, you can almost certainly use it within DAQFactory.  And a device such as the ones you are looking for is not going to have a complex protocol.

 

If you then have to have USB, you can always buy a USB to serial converter, though those have their issues.

Link to comment
Share on other sites

As a follow-up I will describe my final solution, though it is not ideal. It is simply to use a slide potentiometer.  I just discovered that there are some enclosed ones that have a spring-extend plunger.  The key was not to use the term "slide potentiometer" but rather to call them; "Resistive Sensor" or "linear sensors" or "linear encoders" - though those terms are more commonly used for variable-inductive, optical encoder, or magneto-resistive devices, that cost MUCH more.

 

Since these linear slide pots are only around $35, Cost was enough of a factor in this project, that it drove this decision.

Here are some links to sources, if others are interested;

$36 http://www.newark.com/bei-sensors/9610r3-4kl2-0/linear-position-sensor/dp/86H6855?MER=PPSO_N_P_EverywhereElse_None

$27 http://www.newark.com/bourns/3048l-5-103/pot-lin-motion-10kohm-20-250mw/dp/04B2321

$57 http://www.alliedelec.com/search/productdetail.aspx?SKU=70089315

 

-Joe

Link to comment
Share on other sites

  • 7 months later...

I have a digital dial indicator with SPC out wired to a LabJack T7-PRO.  Using LJStreamM I was able to collect the output at 24kHz and in Excel parse it to get the bits and convert it to the number displayed on the indicator.  This was a sanity check to understand how to decipher the number from the bits.  I now want to have DAQFactory do this real time.  My attempts so far have failed.  I can't get data anywhere near 2000 Hz of better in order to read the bits off of the indicator.  Once I can get that worked out my next issue is where do I put code to decipher the number from the bits?  In DAQFactory 5.9 I've tried vChannel and Seqences to add some code.  I'm noobishly missing something I'm sure.  Any help would be appreciated.

 

Thanks,

Ian

Link to comment
Share on other sites

To do acquisition faster than about 50-100hz with any device and any software you have to revert to hardware paced streaming.  This means the hardware controls the acquisition and sends data to the PC in bursts.  The T7 does streaming and, well, just about everything else, different than the other LabJacks because it uses a different software library from LabJack called the LJM.  Please see this post:

 

http://www.azeotech.com/board/index.php?/topic/5589-t7-analog-channel-streaming/

 

for a sample of T7 streaming.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.