hexagon logo

Changing characters in operator input

Hi Guys & Dolls.

My colleaques are doing the measurement, and I do the programming, testing and release off the programs.
That works like a charm.

But...
They have to tip in an ordernumber manually, unfortunaly the ordernumber are printed like this 123456/78/90
And this / (slash) must for orther causes be changed til - (minus), so it look like this: 123456-78-90

I could make a check, and ask them to re-type the number, but I think it would be easyer to just change the "illegal" character, and move on.

So my challenge is... How can I do that?

It would be perfect, if the procedure could be used in other matters as well.
Like when they tip in a value and uses the decimal at the numeric keyboard.
In Denmark it gives me a , (comma), and not a . (decimal),

My SPC-software will not accept the value unless it is like this: 12.5 (with a decimal), and my colleaques are very often tipping 12,5 (with a comma)
The same goes for the calculations made with the input from my colleaques.

I have made a lot of attempts, but can't seem to nail it.


Can anyboy help me out her ?


Using: PC-DMIS 2019


Parents
  • I would try something like :
    ASSIGN/VINPUT="523542/12/12"
    ASSIGN/V1=ELEMENT(1,"/",VINPUT)
    ASSIGN/V2=ELEMENT(2,"/",VINPUT)
    ASSIGN/V3=ELEMENT(3,"/",VINPUT)
    ASSIGN/VINPUT2=V1+"-"+V2+"-"+V3

    Maybe KatmandudaMeow is right, using a "/" needs sometimes another "/"... But I don't remember when Wink.
Reply
  • I would try something like :
    ASSIGN/VINPUT="523542/12/12"
    ASSIGN/V1=ELEMENT(1,"/",VINPUT)
    ASSIGN/V2=ELEMENT(2,"/",VINPUT)
    ASSIGN/V3=ELEMENT(3,"/",VINPUT)
    ASSIGN/VINPUT2=V1+"-"+V2+"-"+V3

    Maybe KatmandudaMeow is right, using a "/" needs sometimes another "/"... But I don't remember when Wink.
Children