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.
  • yes i had to use 2 of them because its probly seeing the first one as an address location most likely but i could be wrong. all i know is if i used 1 then it seen it as none.
    just like when assigning a variable for the print command, you have to use 2 of them to write to a network location.

    so in your assignment v1,v2,v3 etc. ASSIGN/V1=ELEMENT(1,"//",VINPUT)


    maybe it was "\" im not sure exactly, would have to try it out again. yes defently "\" it erases the first one even on here in the chat
Reply
  • yes i had to use 2 of them because its probly seeing the first one as an address location most likely but i could be wrong. all i know is if i used 1 then it seen it as none.
    just like when assigning a variable for the print command, you have to use 2 of them to write to a network location.

    so in your assignment v1,v2,v3 etc. ASSIGN/V1=ELEMENT(1,"//",VINPUT)


    maybe it was "\" im not sure exactly, would have to try it out again. yes defently "\" it erases the first one even on here in the chat
Children
No Data