hexagon logo

External import

Hi all, any help would be grateful. I am using the cmm running Quindos 7 to find a discrete point in space for x,y,z coordinates while touching onto a pressure gauge. At the point of maximum pressure I would like quindos to read from the gauge and import the results into the program. I can do this manually with inqval etc however, as this is required in multiple locations I would like to automate this?

Thanks

Daz123
Parents
  • Hello, It depends on how the data is being output from your pressure gauge. If it can create a text file containing the X,Y & Z co-ordinates in the format we need then you can use the following code to wait for the file to appear and then read it directly into an element.

    1001:CONTIN
    WAIT            (SEC=2)
    IfExec          (BXP=FileExists(C:\Users\Public\Documents\MyFile.txt), CMD='CONTIN', RUN=Y, ONF='UNWIND          (VAL=0, STO=N, FRA=1, LAB=1001)')
    CNVFIL           (FIL=C:\Users\Public\Documents\MyFile.txt, TYP=ELE, DST=LDB, DEL=Y)
    For this to work, the data needs to be in the following format




    $ELE (NAM=Pressure_Gage_Point, TYP=APT, FLD=(X,Y,Z,U,V,W,R))
    82.596163, 2.002251, -32.16095, -1, 0, 0, 0.000000
    $END

    However, if you need to interface directly with your pressure gauge you would probably have to use IO commands that are designed for talking to PLC's and form part of the PALLET license option. A third option might be to use an external script (visual basic for example) to talk to your gauge and create a file that QUINDOS can read - you could launch your script via the SPAWN command and then use my code above to wait for the file.

Reply
  • Hello, It depends on how the data is being output from your pressure gauge. If it can create a text file containing the X,Y & Z co-ordinates in the format we need then you can use the following code to wait for the file to appear and then read it directly into an element.

    1001:CONTIN
    WAIT            (SEC=2)
    IfExec          (BXP=FileExists(C:\Users\Public\Documents\MyFile.txt), CMD='CONTIN', RUN=Y, ONF='UNWIND          (VAL=0, STO=N, FRA=1, LAB=1001)')
    CNVFIL           (FIL=C:\Users\Public\Documents\MyFile.txt, TYP=ELE, DST=LDB, DEL=Y)
    For this to work, the data needs to be in the following format




    $ELE (NAM=Pressure_Gage_Point, TYP=APT, FLD=(X,Y,Z,U,V,W,R))
    82.596163, 2.002251, -32.16095, -1, 0, 0, 0.000000
    $END

    However, if you need to interface directly with your pressure gauge you would probably have to use IO commands that are designed for talking to PLC's and form part of the PALLET license option. A third option might be to use an external script (visual basic for example) to talk to your gauge and create a file that QUINDOS can read - you could launch your script via the SPAWN command and then use my code above to wait for the file.

Children