. .
Page 4 of 8 FirstFirst ... 23456 ... LastLast
  1. I installed it and had to go and find/install the required inpout32.dll.
    Ah Sorry, I must have missed theat out of the installer script. (the inpout.dll is only required to handle the touch switch input on my panel-pc)

    The version I installed as far as I could work out could only open two scales (X and Y). Is that a limitation or me being stupid?
    No not your fault :) I added the 'demo' option while testing the ADJ function, so I've only added X&Y to the menu. It will happily display four (or more) scales.

    Each PIC has the same code, on power up each one detects the status of its pin5, then assigns itself as X,Y,Z or W. When the PIC detects a scale it informs the VB app, which then adds a display panel)

    One question I have is whether there is a practical maximum cable length between the reader and the PIC board.
    I use 1.5-2m screened cables (soldered to the scale). It would be wise to route them away from strong noise sources.


    [edit] found a 600mm scale on ebay:
    http://cgi.ebay.co.uk/Mill-Lathe-Hor...item439ddc49a7

  2. The Following User Says Thank You to BillTodd For This Useful Post:


  3. Quote Originally Posted by BillTodd View Post
    [edit] found a 600mm scale on ebay:
    http://cgi.ebay.co.uk/Mill-Lathe-Hor...item439ddc49a7
    Thats the same as the one I got on ebay for £17 a week or so back :)

  4. #33
    Quote Originally Posted by BillTodd View Post
    Ah Sorry, I must have missed theat out of the installer script. (the inpout.dll is only required to handle the touch switch input on my panel-pc)
    It was not a problem, it was easy to find and install

    No not your fault :) I added the 'demo' option while testing the ADJ function, so I've only added X&Y to the menu. It will happily display four (or more) scales.

    Each PIC has the same code, on power up each one detects the status of its pin5, then assigns itself as X,Y,Z or W. When the PIC detects a scale it informs the VB app, which then adds a display panel)
    That's quite neat, you have thought of everything. I recognised that the ASM code was the same for all PICs on the board which is also a smart move.

    I managed to load the project and ASMs and do a successful 'Make' with all of the Include files as well. I just needed to change the location for the files as I don't have a D:\ drive. - it all looks good so far


    I use 1.5-2m screened cables (soldered to the scale). It would be wise to route them away from strong noise sources.
    That's quite a healthy length, much longer than I would need.


    Thanks Bill.

  5. #34
    Quote Originally Posted by BillTodd View Post
    Ah Sorry, I must have missed theat out of the installer script. (the inpout.dll is only required to handle the touch switch input on my panel-pc)

    No not your fault :) I added the 'demo' option while testing the ADJ function, so I've only added X&Y to the menu. It will happily display four (or more) scales.

    Each PIC has the same code, on power up each one detects the status of its pin5, then assigns itself as X,Y,Z or W. When the PIC detects a scale it informs the VB app, which then adds a display panel)

    I use 1.5-2m screened cables (soldered to the scale). It would be wise to route them away from strong noise sources.


    [edit] found a 600mm scale on ebay:
    http://cgi.ebay.co.uk/Mill-Lathe-Hor...item439ddc49a7
    Hi Bill,
    I have managed to program 4 off 12F675 PICS but for a quick demo breadboard can I just install 1 or 2 Vernier PICs into the RS232 interface driver rather than all 4. If so do I need to install X then Y then Z etc in that order. I'm getting to understand your assembly code but i've not quite figured out the TxSyn operation yet on GP4 in relation to channel time slots.

    Cheers, John

  6. #35
    Quote Originally Posted by 1113562 View Post
    Hi Bill,
    I have managed to program 4 off 12F675 PICS but for a quick demo breadboard can I just install 1 or 2 Vernier PICs into the RS232 interface driver rather than all 4. If so do I need to install X then Y then Z etc in that order. I'm getting to understand your assembly code but i've not quite figured out the TxSyn operation yet on GP4 in relation to channel time slots.

    Cheers, John

    I have build a prototype board to test a single channel although the board is built to a level to take 3 of the PICs with expansion for the 4th.

    On test with one PIC installed and connected up to a caliper I am getting something and it recognises the correct channel but the displayed valued is very eratic and not representative of the vernier positional movements. I'll need to get the scope out to see why it is so all over the place. Perhaps I have a noise issue with my set-up. The power supplies look quite stable with a DMM but without scoping it there could be some nasty spikes around... I'm getting there slowly.lol

    I tried to add a few pics but I'm not sure if it worked

  7. #36
    I realised pics were too big so here is a re-sized version of the prototype (lash-up) with one programmed PIC installed in channel Y

    Click image for larger version. 

Name:	Picture 001.jpg 
Views:	378 
Size:	189.9 KB 
ID:	2151

  8. ISTR you can fit one or more PICs as required.

    I'm getting to understand your assembly code
    Congratulation John - that's more than I ever did :LOL:

    From memory, the Txsyn timing is a simple grab a slot when ready affair with a different delay based on chip position to help prevent collisions.
    (i.e. if Txsyn = hi, delay X.Y,Z or W recheck Txsyn if hi, pull txsyn low and transmit)

    Is the vernier being switched into fast mode correctly? Different makes/types of scale have different clk/data line switching sequences so some don't work with out mod'ing the code


    Are you powering the scales from the interface or the on-board cell? (I replaced the cells with a ~1uF SM cap) What voltage are you ghetting across the PSU red-led?

    The serial port is running at 115,200 baud, so screening and good earthing is advisable. And, it derives its -Ve from the PC so, just check that's working OK.

  9. #38
    Quote Originally Posted by BillTodd View Post
    ISTR you can fit one or more PICs as required.
    I tried this as you can see in the photo as it sort of worked so I assumed the design does not require all PICs in place

    Is the vernier being switched into fast mode correctly? Different makes/types of scale have different clk/data line switching sequences so some don't work with out mod'ing the code
    I think it is I being switched - I get a small hi symbol appearing on the LCD display. The zero switch on the vernier doesn't zero when connected to your interface it just seems to make it switch between fast and slow mode. I will try another vernier I have which is a later BCD output model with a 2032 3V button cell battery.

    Are you powering the scales from the interface or the on-board cell? (I replaced the cells with a ~1uF SM cap) What voltage are you ghetting across the PSU red-led?
    Yes I'm powering from the interface board. I don't have a cell in place or a cap. I'll try and put a 1uF in the place of the battery cell, that may stabilise things. Whats your suggestion for the 3V verniers as I note the signals are still only 1.5 v p-p despite the 3V cell? I measured my LED Vernier power output as 1.63V, its bit hi but thats due to the LED i'm using. Do you think I should try and get this back to 1.5V?

    The serial port is running at 115,200 baud, so screening and good earthing is advisable. And, it derives its -Ve from the PC so, just check that's working OK.
    As you can see i've used a crap bit of ribbon for this cable but ist only about 20" long. I must try to improve this with a screened cable. I am getting a good 0V reference from the PC. I'll look at all this later with a scope to see whats going on, in the end its bound to be an analogue thing.

    Thanks for all your help. John

  10. #39
    Here is an update to things but to make it easy I have attached a word doc with embedded pics. It describes some scope measurements of the signals on the interface board. I hope it is readable.
    Attached Files Attached Files

  11. It sounds to me like the vernier is not being set to fast mode correctly my the PIC. and it is mis-reading the vernier as a binary version rather than a BCD type.

    Fire up a serial comms package or hyperterminal, if ALL else fails :)

    Set baud to 115,200, 8, n,1

    Send 'i0' and the PIC (in position X) should respond with something.

    ;command line interpretor
    ;Commands: (case insensitive)
    ;rx - Read - reads and transmits abs position (x=x,y,z,w)
    ;sn - Sets sample rate (n=0,1,2) 0 =poll mode, 1 = 300mS (normal), 2 = 20mS (fast mode)
    ;zx - zero vernier display (x=x,y,z,w)
    ;vn - set vernier type (n=0,1) 0 = old, 1=decimal


    send V1 to set decimal vernier, then S0 to set poll mode, then RX and the pic should respond with X00.000: (inches) or X000.00:
    (mm). If it returns XH000000: then it is not reading the vernier as a decimal type.

    I have one vernier here that has a similar problem , so if I can fine the time I'll look into it. In the mean time, you could try inserting an extra pulse clk in the setfast routine

    Code:
    setFaut        bsf    Mode,Auto
    setFast        bsf    Mode,Fast
            clrwdt
            call    zeronorm
            clrwdt            ;pulse clk again if decimal type
            call    Dly200
            call    Plsdata
            btfss    Mode,Vtype 
            return
            clrwdt            ;pulse clk again if decimal type
            call    Dly200
            call    Plsclk
            call    Dly200   ;exta pulse clk *******
            call    Plsclk
            call    txZero        ;send zero message
            return
    A quick PIC to PC test:

    disconnect serial lead from PC , disconnect vernier from PIC

    Run VB application, select correct comm port

    Connect serial lead, connect vernier to PIC - you should see a new frame appear for X, Y, Z or W - if this happens the serial port is working OK.

    you should see the vernier be reset to zero then depending on type H (for hold) and F (for fast)

    Press ZERO (and hold) on the vernier, this will stop the clock signal, after a second or less the PIC will signal the PC to remove the frame .

    Releasing the zero will start the clock, the PIC will signal the PC and the PC will issue a reset to the Vernier.


    If all of the above works the serial comm must be working fine.
    Last edited by BillTodd; 19-05-2010 at 09:58 PM.

Page 4 of 8 FirstFirst ... 23456 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Website idea.
    By qwertyjon in forum General Computing
    Replies: 8
    Last Post: 05-04-2014, 03:29 PM
  2. Here's an idea hacking a Kress 1050 FME
    By m.marino in forum Kress Milling Motors
    Replies: 3
    Last Post: 16-01-2013, 01:05 AM
  3. Why they don't want to accept my idea?
    By hoezap in forum Tool & Tooling Technology
    Replies: 5
    Last Post: 14-07-2012, 01:15 AM
  4. business idea?
    By homer93 in forum Marketplace Discussion
    Replies: 7
    Last Post: 01-06-2012, 12:56 PM
  5. BUILD LOG: Mel's Odd Idea
    By mel_earp in forum DIY Router Build Logs
    Replies: 3
    Last Post: 19-03-2010, 11:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •