Running Basic Scripts

  • Filter
  • Time
  • Show
Clear All
new posts

  • Running Basic Scripts

    OK I am completly baffled and am hoping someone out there can help me with some very basic scripting. I will try my best to explain below what I have done and the problems am I having.

    1. I have created a new part with 6 vector points and set up a basic 3-2-1 manual alignment. I have tested this and it works fine
    2. I have exported this as a BASIC script.
    3. I have imported this BASIC script in to a new empty part.
    4. I then run this new program from scratch and the script loads and runs fine and I can manually take the points. The problem I have is that after the alignment, PC Dmis still thinks its in the startup alignment, i.e. when looking at the toolbar at the top its in STARTUP not A0 as I would of expected it to be. If I now try and take a DCC point at say 0,0,0 which should be at my alignment origin, the machine tries to measure this in its home position further clarifying that something in the script is not working and the program still sees itself in the initial startup alignment.

    Hope the above is not too vague, any help or suggestions are more than welcome

  • #2
    post example

    To start with, you should simplfy the problem to as small a case as possible. Take one point in manual, align/origin to it, then DCC point. COnvert that to a script and try it out.

    Given that, you should post the example here, both the script and the program.

    Also, what version of PC-DMIS are you using?

    I don't remember if the toolbar status gets updated with the script execution, so don't assume that is the best indicator.


    • #3

      Running PC Dmis V3.7 MR3.

      Have done exactly as you said, created a new program (Main_Program.prg) which consists of one manual point and alignment/origin to that point. Then switched to DCC and measured same point. This runs Fine.

      Have exported this as a BASIC script (Main_Program.BAS).

      Have created a new program (Script Program.prg) and inserted the script. This runs as far as the DCC point then gives up the ghost, when you look at the point coordinates they are somewhere in space.

      All programs attached.
      Attached Files


      • #4
        Script is using Machine Coordinates

        In your script, the commands for the point measurement have the XYZ coordinates from the machine positions. They should have 0,0,0 for the XYZ of the THEO and the Hit/Basic commands.

        I don't know how they got this way or why, but when I change it to 0,0,0 (in the two places) it works fine.


        • #5
          Cheers Don, dunno how I didnt spot that, blame it on lack of beer

          Last edited by jon_dav_uk; 10-25-2006, 03:54 PM.


          • #6
            Problem No 2

            Me again Don sorry for being a pain in the ***

            Not sure if I am tackling this project the complete wrong way but I just keep hitting problem after problem.

            Following on from earlier examples I have a basic script at the start of my program which now works.

            After this script I add some points and another alignment which recalls the alignment inside the script, so far so good. If I run the program from the start however, the script runs fine but then the alignment outside the script loses its relationship to the alignment inside the script and everything screws up.

            Do you think you can give this a try and see if its something I am doing

            I have attached the script. If you insert it into a new program and run it, everything is fine. If you say add another point and origin to this new point everything works fine. If you then run from start including the script everything turn to ****

            Any ideas

            Attached Files


            • #7
              Did you find a solution for your problem? I think I have got a similar one.


              Related Topics