hexagon logo

Can PC-DMIS Automatically Take And Save Photos Of Live Image??

Hey guys,

I'm trying to incorporate a line of code that would save an image to a file path before, during or after it measures that feature. Is this possible?

Say the CMM is in DCC mode and the program is measuring a circle, if the circle appears in the live view screen is there any command or line of code to add to save an image of the circle as is before moving onto the next feature?

This would be very helpful in alot of the applications I program for.

Thanks!!!
  • Using the Image Capture Command
    The Insert | Feature | Image Capture menu item inserts an IMAGECAPTURE command into the Edit window. During execution PC-DMIS will move the vision probe to the specified position, and using the passed magnification and illumination values, it will capture an image of the camera's Live View tab and save it as a bitmap file to the specified location.

    The command in the Edit window has the following syntax:

    IMAGECAPTURE/<TheoX, TheoY, TheoZ>,n1

    ILLUMINATION/Top Lamp [ON:60%] : Bottom Lamp [ON:69%] : Ring Lamp [ON:59%{1110}]

    FILENAME=s1


    TheoX, TheoY, TheoZ are the X,Y,Z coordinates to which the machine will move to take the image capture.

    n1 is a number value indicating the desired optical magnification.

    The ILLUMINATION line of the command block contains read-only illumination information of the lamps at the time the command was inserted. Currently, you cannot modify any of that information directly in the Edit window. The Illumination settings must be predefined in the Probe Toolbox or by manual controls (if available) before inserting the command.

    Specifically, the ILLUMINATION line shows whether a lamp is on or off and what the light intensity is for each lamp. Since the ring lamp is made up of four separate lights, the four numbers in parentheses indicate the ON/OFF state for each of those lights. If they have differing levels of intensity the command will only show the highest value.

    s1 is a string value providing the file pathway and name for the captured bitmap image.

    A finished command might look something like this:

    IMAGECAPTURE/<10.825,0.714,-95.008>,1.863

    ILLUMINATION/Top Lamp [ON:60%] : Bottom Lamp [ON:69%] : Ring Lamp [ON:59%{1110}]

    FILENAME=D:\Images\ImageCapture_4.bmp



    Currently, this command does not have a dialog box associated with it, so you need to make parameter changes in the Edit window or by creating a new command.
  • What versoin of PC-Dmis did this come out? I am running 2011 MR1 and this feature is not availabe in the menu's does this mean I cannot use this function?
  • What versoin of PC-Dmis did this come out? I am running 2011 MR1 and this feature is not availabe in the menu's does this mean I cannot use this function?


    Nevermind this post guys I got the line of code figured out. I have one more task that may prove difficult though.


    Say I have 1024 features that are all the same, say they are holes. What I want is my routine to inspect all 1024 of these holes BUT only image capture the holes that are considered out of spec.
    Does anyone have any idea how to get this done? Im sure it can be but I am onyly scratching the surface of coding.

    Please Help!

    Thanks!!Slight smile
  • Forget it I have no idea what im talking about. I misunderstood the question
  • If/then statement?

    Nowhere near a machine ...


    If dia1.dia.actual > Upper.Spec.Limit then take.selfie.code
    If dia1.dia.actual < Lower.Spec.Limit then take.selfie.code
  • If/then statement?

    Nowhere near a machine ...


    If dia1.dia.actual > Upper.Spec.Limit then take.selfie.code
    If dia1.dia.actual < Lower.Spec.Limit then take.selfie.code


    I chuckled at this one. Take a selfie...haha.
  • If/then statement?

    Nowhere near a machine ...


    If dia1.dia.actual > Upper.Spec.Limit then take.selfie.code
    If dia1.dia.actual < Lower.Spec.Limit then take.selfie.code


    Alright in all seriousness, is this exactly how the code will be written?

    Could you show me how it would look with the Image Capture line of code in it?
  • Forget it I have no idea what im talking about. I misunderstood the question


    Adam,
    What I want to do is measure alot of the same feature but "Image Capture" features that are out of spec.
  • I don't have a vision system and still not near a machine. I can' t remember the exact syntax. Try looking in help for flow control commands. Generally speaking though if/thens are fairly easy in Pc dmis. A dialog box will help quide you thru setting up the code.
    If condition is true then do something else go on to the next command. Sorry for being vague but its the best I can do without Pc dmis in front of me.
  • While positioned over the hole in question, evaluate the diameter.
    Use the OUTTOL property for the if-then clause.

    Pseudocode:
    if CIR1.OUTTOL <> 0 then 
    take picture and save
    end if
    ...
    move to next circle and repeat