String Variables is it possible
Close
Login to Your Account
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2017
    Country
    NETHERLANDS
    Posts
    43
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    4

    Default String Variables is it possible

    Is it possible to use string variables in Okuma programming. In other words to use instead of numbers or a combination of both?

  2. #2
    Join Date
    Sep 2015
    Country
    UNITED STATES
    State/Province
    Ohio
    Posts
    1,064
    Post Thanks / Like
    Likes (Given)
    638
    Likes (Received)
    1026

    Default

    Not sure what you mean. Like this?

    V1=1.000
    V2=.100
    G0 X=V1 Z=V2

    Yes you can.

  3. #3
    Join Date
    Jun 2017
    Country
    NETHERLANDS
    Posts
    43
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    4

    Default

    I mean V1=M156890-A .

  4. #4
    Join Date
    Sep 2015
    Country
    UNITED STATES
    State/Province
    Ohio
    Posts
    1,064
    Post Thanks / Like
    Likes (Given)
    638
    Likes (Received)
    1026

    Default

    I don't know what M or A signifies. I thought all variables started with V.

    Type it in MDI, cycle start, and look at the value of V1?

  5. #5
    Join Date
    Jun 2017
    Country
    NETHERLANDS
    Posts
    43
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    4

    Default

    Question in these is. Is there way to initialise a variable with text. Global and local variables for example does only except numbers.

  6. #6
    Join Date
    Dec 2010
    Location
    PA
    Posts
    641
    Post Thanks / Like
    Likes (Given)
    180
    Likes (Received)
    167

    Default

    Quote Originally Posted by TheDutchMultus View Post
    Question in these is. Is there way to initialise a variable with text. Global and local variables for example does only except numbers.
    Why would you need to program like this? Can you give an example?

  7. #7
    Join Date
    Jun 2017
    Country
    NETHERLANDS
    Posts
    43
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    4

    Default

    For example to to check drawing numbers.
    IF [VSTRING EQ M247659-A]NFAN

  8. #8
    Join Date
    Jun 2013
    Location
    St. Louis
    Posts
    653
    Post Thanks / Like
    Likes (Given)
    472
    Likes (Received)
    294

    Default

    Quote Originally Posted by TheDutchMultus View Post
    For example to to check drawing numbers.
    IF [VSTRING EQ M247659-A]NFAN

    The short answer is No. There is no way (that I know of at least) to compare a string within G-Code. Perhaps if you could better articulate why you would want to check a string. There is no way to ask the operator to input a string to compare against, so I'm not sure how checking against a drawing number would be fruitful. They have all sorts of apps in the Okuma App store that can do useful work, such as loading a program, based on a barcode scan... if thats the sort of thing you were thinking of. The THINC API is also open source for you to write your own apps in. It's certainly possible to compare strings in C#. Aside from that, most Okuma born in the last 20 years or more are Turing Complete, so yes, you can play with strings, but you will half to implement it yourself (an ASCII chart might come in handy).

  9. #9
    Join Date
    Jun 2017
    Country
    NETHERLANDS
    Posts
    43
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    4

    Default

    At first thanks for this reaction, i appreciate it very much.

    I wanted te check if other data such as engravings, are matching with the drawing number/text.

    To Learn C# is a long way to go, i already gave C++ a go. But it is very hard to learn.

  10. Likes iMillJoe liked this post

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •