Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Using variable in tag name in column C #19926

    chrsyv
    Member

      Ok, it won’t be optimal, but it will fill our needs! thanks for the help!

      Oh, when using this solution, is there a limit of sorts for how many lines of code in the excel sheet SM can handle before it becomes notably slow, or any other limitations?

      in reply to: Using variable in tag name in column C #19924

      chrsyv
      Member

        So I would like to use the contents of scancode to decide with PLC block I would want to control.

        in reply to: Using variable in tag name in column C #19923

        chrsyv
        Member

          Say I have 100 PLC blocks, all configured the same.

          Pin CMD.1 on the block starts the engine
          Pin CMD.2 on the block stops the engine
          Pin CMD.3 reads out if the engine is running or if it’s stopped.

          Normally, to start engine one, I would use this line in SM

          Startengine BOOL engine1.CMD.1 style=”slider” and the rest that needs to be set up.

          however this requires me to create 1 line in the excel sheet for each plc block I would want to control.
          Instead, i would like to use the string from the scancode for the FIRST part of the PLC tag I want to connect to.

          So instead of using
          Startengine BOOL engine1.CMD.1 style=”slider” and the rest that needs to be set up.

          I want to use
          Startengine BOOL scancode.CMD.1 style=”slider” and the rest that needs to be set up.

          where scancode can be Engine1-100 depending on what I scanned.

          I might have misunderstood your example, but from what I’m reading, you set the value true or false to one tag, and if the information on the scancode is any different from what you posted, nothing will happen.
          I can’t really explain it any better, and I don’t know how I can do it on the PLC.

          in reply to: Using variable in tag name in column C #19921

          chrsyv
          Member

            i’m using the softlogix plc, so the eth/ip protocol.

            I’ll try and add some more info to my problem:

            Let’s say I have 3 engines standing next to eachother, each with it’s seperate QR code. When the QR-code is scanned the names are Engine1, Engine2, Engine3.

            What I would like is go up to an engine, scan the QR code, then get the right information on the iPad. The problem with your example is that I would need 3 lines for each engine (start/stop/status) instead of 3 lines for all engines.

            what is in my head is: (ignore if the info in column D is wrong, it’s the column C that matters
            //EXAMPLE
            scannedData STRING internal style=barcode;
            startengine BOOL scannedData.1 style=”slider” ; write_access=0; (and the rest of the info needed)
            stopengine BOOL scannedData.2 style=”slider” ; write_access=0; (and the rest of the info needed)
            Status engine BOOL scannedData.3 READ OUT INFO ON ENGINE
            //EXAMPLE STOP

            but the problem is using the variable scannedData in the connection to the PLC doesn’t work this way.

          Viewing 4 posts - 1 through 4 (of 4 total)
          Copyright © SweetWilliam, S.L 2009-2013. All rights reserved.
          Science and Technology Park of the University of Girona, Emili Grahit, 91 (NarcĂ­s Monturiol building, Office P3-B03) 17003-Girona. Phone +34972183244