1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. Stäubli & Bosch Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Issue with Storing Scanned Barcode Values VAL 3 staubli

  • Julian DEBYSER
  • October 23, 2024 at 5:31 PM
  • Thread is Unresolved
  • Julian DEBYSER
    Posts
    2
    • October 23, 2024 at 5:31 PM
    • #1

    Hello everyone,

    I am working on a project that uses a barcode scanner, and I have three different barcodes that need to launch three different applications. However, I am facing an issue with storing the scanned value so that I can use it to trigger the appropriate applications.

    Could you please help me find an effective solution to store these values? Any suggestions would be greatly appreciated!

    Thank you in advance for your help!

    Best regards,

  • Lemster68 October 23, 2024 at 5:35 PM

    Approved the thread.
  • Lemster68 October 23, 2024 at 5:35 PM

    Moved the thread from forum General Discussion of Industrial Robots Only to forum Stäubli & Bosch Robot Forum.
  • aknezevi.proton
    Reactions Received
    5
    Trophies
    1
    Posts
    73
    • October 24, 2024 at 11:26 AM
    • #2

    Details regarding how you read barcodes and how do you know they are read properly would be appreciated.

    Also which robot arm are you using, which controller are you using?

  • Julian DEBYSER
    Posts
    2
    • October 24, 2024 at 3:42 PM
    • #3
    • Barcode Scanning: I'm using a barcode scanner that acts like a keyboard, inputting the scanned code into a field. I’m looking for a robust method to confirm that the barcode has been read correctly before proceeding to launch the corresponding application.
    • Robot Arm and Controller: We are using a Staubli TX2-touch-90XL robot arm with a CS9 controller. I would appreciate any insights specific to working with this hardware and how best to integrate the barcode data processing within this system.

      image.png
      And this is the code who rule this

      <!DOCTYPE html SYSTEM "-//W3C//DTD VALHTML Strict//EN">
      <html xmlns="http://www.staubli.com/robotics/2016/03/valhtml">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
      <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"></meta>
      <meta http-equiv="Pragma" content="no-cache"></meta>
      <meta http-equiv="Expires" content="0"></meta>
      <script type="text/javascript" src="/vendor/libs/stblUserPage.min.js"></script>
      <script type="text/javascript">
      let barcodeHistory = [];

      // Fonction pour envoyer le code-barres au CS9
      function sendBarcodeToCS9(barcode) {
      fetch(`http://172.31.102.53:5900/start?code=${barcode}`) // Remplace l'IP et le port par ceux du CS9
      .then(response => console.log("Code-barres envoyé avec succès"))
      .catch(error => console.error("Erreur d'envoi du code-barres : ", error));
      }

      // Fonction appelée lorsqu'un code-barres est scanné
      function handleBarcodeScan(barcode) {
      barcodeHistory.push(barcode);
      document.getElementById("barcodeHistory").innerText = barcodeHistory.join("\n");
      document.getElementById("barcodeOutput").innerText = barcode;
      sendBarcodeToCS9(barcode); // Envoie le code-barres scanné au CS9
      setTimeout(() => {
      document.getElementById("barcodeInput").value = ""; // Réinitialise l'input après 2 secondes
      }, 2000);
      }

      // Détection automatique après la fin du scan
      function detectBarcode() {
      const barcodeInput = document.getElementById("barcodeInput");
      const barcode = barcodeInput.value.trim();
      if (barcode.length > 0) {
      handleBarcodeScan(barcode); // Traite le code-barres scanné
      }
      }

      window.onload = function() {
      const barcodeInput = document.getElementById("barcodeInput");
      barcodeInput.addEventListener("input", detectBarcode); // Détecte l'entrée des codes
      }
      </script>
      </head>
      <body style="width: 480px; height: 690px; margin: 0">
      <h1>Scanner le code-barres</h1>
      <input type="text" id="barcodeInput" placeholder="Scannez ici" autofocus=""></input>
      <h2>Dernier code-barres scann&#233;</h2>
      <pre id="barcodeOutput">Aucun code-barres scann&#233; pour l&#39;instant</pre>
      <h2>Historique des codes scann&#233;s</h2>
      <pre id="barcodeHistory">Aucun code-barres scann&#233; pour l&#39;instant</pre>
      </body>
      </html>

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Tags

  • @staubli @val3
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download