EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024
<== Date ==> <== Thread ==>

Subject: Re: MVME6100 vxworks and maxv timeout
From: Kevin Peterson via Tech-talk <tech-talk at aps.anl.gov>
To: whitetiger1123 <holyeongbaeg at gmail.com>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 14 May 2024 13:48:37 -0500
The error means that the driver didn't get a response from the controller in 16.7 seconds (assuming the default VxWorks system clock frequency):

https://urldefense.us/v3/__https://github.com/epics-motor/motorOms/blob/dca9b664904de6378854844882605179663a30e7/omsApp/src/drvMAXv.cc*L704__;Iw!!G_uCfscf7eWS!ecTkN7c-rl1I5poPYqAh8icrv3cKL5VrVnAvEQktwg73bcckxRUlel5VIbYuErBRQEEIYPXoJRjiIZjgEFd9S1s$ The problem is likely due to the a mismatch between the MAXv jumper configuration and the MAXv software configuration in the IOC.

A former coworker developed some javascript code to help determine the correct jumper settings. I tried to share it with tech-talk back in 2022 (https://urldefense.us/v3/__https://epics.anl.gov/tech-talk/2022/msg01861.php__;!!G_uCfscf7eWS!ecTkN7c-rl1I5poPYqAh8icrv3cKL5VrVnAvEQktwg73bcckxRUlel5VIbYuErBRQEEIYPXoJRjiIZjgoh3BSy0$ ) but html attachments aren't handled correctly on the tech-talk web page. I've attached it again, this time as a text file.

Kevin

On 5/12/24 22:07, whitetiger1123 via Tech-talk wrote:
It booted up very well, but I can see some error when communicate with maxv oms controller.

Error message is “MAXv card #0 communication timeout”
<!DOCTYPE html>
<html>
  <head>
    <title>BCDA MAXv jumper assignments</title>
    <meta charset="UTF-8">
    <script type="text/javascript">
      
      function is_hexadecimal(str)
      {
          regexp = /^[0-9a-fA-F]+$/;
          
          if (regexp.test(str))
              return true;
          else
              return false;
      }
      function check_addr(addrstr, mode)
      {
          switch(mode)
          {
              case 0:
              if( (addrstr.length != 8) || ( addrstr.substring(2) != "000000") ||
                  !is_hexadecimal(addrstr) )
                  return false;
              break;
              case 1:
              if( (addrstr.length != 6) || ( addrstr.substring(2) != "0000") ||
                  !is_hexadecimal(addrstr) )
                  return false;
              break;
              case 2:
              if( (addrstr.length != 4) || ( addrstr.substring(1) != "000") ||
                  !is_hexadecimal(addrstr) )
                  return false;
              break;
          }
          
          return true;
      }

      function draw_maxv()
      {
          function draw_jumper_block( jspec)
          {
              let lrx = rx + jumper_block[jspec].xoffset*bs;
              
              ctx.beginPath();
              ctx.fillStyle = "#000000";
              ctx.fillText(jspec, lrx, ry+2*bs+fs);
              ctx.stroke();

              ctx.beginPath();
              ctx.fillStyle = "#FFFFFF";
              ctx.fillRect( lrx, ry, jumper_block[jspec].jumpers.length*bs + 1, 2*bs);
              ctx.stroke();
              
              ctx.lineWidth = lw;
              ctx.strokeStyle = "#000000";
              ctx.strokeRect(lrx, ry, jumper_block[jspec].jumpers.length*bs + 1, 2*bs);

              for( i in jumper_block[jspec].jumpers)
              {
                  ctx.lineWidth = lw;
                  ctx.strokeRect(lrx + i*bs+2, ry+2, bs-3, 2*bs-4);
                  
                  ctx.fillStyle = "#606060";
                  ctx.beginPath();
                  ctx.fillRect( lrx + i*bs+bs/2-2.5, ry+bs-12.5, 6, 6);
                  ctx.fillRect( lrx + i*bs+bs/2-2.5, ry+bs+6.5, 6, 6);
                  ctx.stroke();
                  
                  if( jumper_block[jspec].jumpers[i] == 1)
                  {
                      ctx.lineWidth = 7*lw;
                      ctx.strokeRect(lrx + i*bs+8, ry+8, bs-15, 2*bs-16);
                  }
              }
              
          }
        
          var jumper_block =
              { "J12": { "xoffset":0, "jumpers": [0,0,0,0,0,0]},
                "J13": { "xoffset":7, "jumpers": [0,0,0,0,0,0,0,0,0,1,0,0,0,0]} };
          
          var rx = 25.5;
          var ry = 55.5;
          var bs = 30; // blocksize
          var fs = 20; // fonstsize
          var lw = 1;
        
          var xx;
        
          var c = document.getElementById("maxv_canvas");
          var ctx = c.getContext("2d");

          ctx.beginPath();
          ctx.fillStyle = "#FFDD99";
          ctx.fillRect( 0, 0, c.width, c.height);
          ctx.stroke();
        
          ctx.lineWidth = lw;
          ctx.font = fs + "px Arial";


          var mode = parseInt(document.getElementById("mode_input").value)
          jumper_block.J12.jumpers[mode] = 1;
          switch(mode)
          {
              case 0:
              jumper_block.J13.jumpers[13] = 1;
              case 2:
              jumper_block.J13.jumpers[12] = 1;
              break;
          }

          var irq = parseInt(document.getElementById("irq_input").value)
          var nirq = ~irq;
          for( let i = 0; i < 3; i++)
              if( nirq & (1 << i))
                  jumper_block.J12.jumpers[5-i] = 1;


          var addrstr = document.getElementById("addr_input").value;
          if( !check_addr( addrstr, mode) )
          {
              let errstr;
              
              if( mode ==0)
                  errstr = "A32 address needs to be of the form \"XX000000\","; 
              else if( mode == 1)
                  errstr = "A24 address needs to be of the form \"XX0000\",";
              else
                  errstr = "A16 address needs to be of the form \"X000\",";

              errstr += "where X is a hex digit."
              ctx.beginPath();
              ctx.fillStyle = "#000000";
              ctx.fillText( errstr, 30, 70);
              ctx.stroke();

              return true;
          }
         
          var addr = parseInt( addrstr, 16);
          var naddr;
          switch( mode)
          {
              case 0:
              naddr = ~(addr/0x1000000);
              for( let i = 0; i < 8; i++)
                  if( naddr & (1 << i))
                      jumper_block.J13.jumpers[i] = 1;
              break;
              case 1:
              naddr = ~(addr/0x10000);
              for( let i = 0; i < 8; i++)
                  if( naddr & (1 << i))
                      jumper_block.J13.jumpers[i] = 1;
              break;
              case 2:
              naddr = ~(addr/0x1000);
              for( let i = 0; i < 4; i++)
                  if( naddr & (1 << i))
                      jumper_block.J13.jumpers[4+i] = 1;
              break;
          }

          
          ctx.beginPath();
          ctx.fillStyle = "#000000";
          ctx.fillText("MAXv jumper settings:   IRQ=" + irq + "   Mode=A" +
                       (32-8*mode) + "   Address=" + addr.toString(16).toUpperCase(),
                       60, 30);
          ctx.stroke();

          
          for( j in jumper_block)
              draw_jumper_block(j);

          return true;
      }
      window.onload = function(){ draw_maxv(); }
    </script>
    <style>
      body { margin: 15px 35px;
             max-width: 800px; }
      canvas { border:1px solid #000000; }
      input[type=number]{ width: 50px; } 
    </style>
  </head>
  <body>
    <h1>BCDA MAXv jumper assignments</h1>
    <p>
      IRQ is typically 5, and Mode is typically A16 and sometimes A24.
    </p>
    <form id="maxv_form" onsubmit="return false;">
      <p>
        <label for="irq_input">IRQ: </label>
        <select id="irq_input" onChange="draw_maxv()">
          <option value="2">2</option>
          <option value="3">3</option>
          <option value="4">4</option>
          <option value="5" selected>5</option>
          <option value="6">6</option>
          <option value="7">7</option>
        </select>&emsp;
        <label for="mode_input">Mode:</label>
        <select id="mode_input" onChange="draw_maxv()">
          <option value="2" selected>A16</option>
          <option value="1">A24</option>
          <option value="0">A32</option>
        </select>&emsp;
        <label for="addr_input">Address: 0x</label>
        <input id="addr_input" type="text" value="A000" size="10"
               onChange="draw_maxv()"> 
      </p>
    </form>
    <canvas id="maxv_canvas" width="685" height="155">
    </canvas>
    <p>
      The address modifiers are on J13, but those are set to our
      normal options: supervisory data access, and the size access
      corresponding to the mode: Short for A16 (0x2D), Normal for A24
      (0x3D), and Extended for A32 (0x0D).
    </p>
  </body>
</html>


References:
MVME6100 vxworks and maxv timeout whitetiger1123 via Tech-talk

Navigate by Date:
Prev: Re: difference between DB and DB_INSTALLS Johnson, Andrew N. via Tech-talk
Next: Magna Power TS Zumbruch, Peter Dr. via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024
Navigate by Thread:
Prev: MVME6100 vxworks and maxv timeout whitetiger1123 via Tech-talk
Next: vme control motor log message whitetiger1123 via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024
ANJ, 16 May 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·