SbRIO-9641 random indexing

Hello everyone. Sorry for my question if it's too easy... I am programming sbRIO-9641, module LV2012 RT + FPGA + NI_RIO 12.0 and try to build program for memory. Compilation of this programm (pict) gives me a random result, and if I set the timer loop they show me random result in limits [0.160] too. What's wrong?

Thank you very much for your help!


Tags: NI Software

Similar Questions

  • CS3 mpeg2 random indexing

    Hello

    Time is of the essence, we work primarily with native mpeg2 files.

    We use 2 workstations:

    -1, mainly for the edition PPro2 running

    -1 running CS3 mainly for rendering

    This system worked like a charm, until we changed the PC running CS3 at a Quad Core 3 GB XP 32 bit to a Core eight 12 GB Windows 7 64 bit.

    Now, the files are indexed slowly in CS3. The worst is that it seems to be random! Sometimes he's going to migrate a project without indexing, and sometimes it will slowly index files.

    We tried CS4 and CS5, but who are not options, CS4 is too slow and don't transfer well to CS5 projects.

    Any idea?

    Thank you

    Jerome

    Welcome to the forum.

    Most likely, the switch of the machine mixed your autour drive letters, especially if you use external references.  Ensure that the structures of folders and drive letters that you used on the old machine are identical on the new machine.

    -Jeff

  • Index random

    Hello

    I am building a website in Muse CC and I wanted to know if there is a way to have a 'random index page'.

    I would like it when someone refresh the page, or when someone comes to the site, the index page do not have the same thing every time.

    I have 8 pages. Only 5 should share the index.

    Is it possible to Muse or a plugin to download (musegain?) to do this?

    I saw a similar request, but it was for an image, not a whole page.

    Thank you for your help

    Nothing to do with the Muse. This must be configured on the server.

    Mylenium

  • Index of the property that contains an object in a picture

    I have 3 bays, structured way is the image for the animation label, and the other two contain the high and low values for the random damage Calculator (which works fine). There is a property called curAnim that gets value according to a random index in itself (a string, because it is an image tag). I must be able to set a property that will contain the correct damage to a high index values and low damage tables is the same index of the image tag. Here is a code:

    Switch (curType)

    {

    case 'atk ':

    curAnim = attackList [randomCalc (0, attackList.length)];

    if(curAnim == null)

    {

    gotoAndPlay ('punch');

    curTarget.damage (atkDamL [curAnim], atkDamH [curAnim]); Here I try to send the low damage and high values to the target enemy (and the damage function works very well)

    returnMe();

    }

    on the other

    {

    gotoAndPlay (curAnim);

    curTarget.damage (atkDamL [curAnim], atkDamH [curAnim]);

    returnMe();

    }

    break;

    To determine the index of something in a table, you can use the Array class indexOf method.

    theIndex = arrayName.indexOf ("frame_label_text")

  • logic game: maze game

    Hi guys - I based my game on http://learnenglishkids.britishcouncil.org/en/practise-listening/sports-maze

    I wondered about the logic of game best to place objects in a table and their distribution in circles. There are many ways, and I don't know how to do it.

    I have the xml code and I'll put that in a table, so I can't continue from there.

    And here's another version. This time this connectors are highlighted when you click on the correct node.

    New class Connector.as:

    package
    {
         import flash.display.Sprite;
         /**
          * Single connector.
          */
         public class Connector extends Sprite
         {
              private var _data:Object;
              private var colorOff:uint = 0x000000;
              private var colorOn:uint = 0xff0000;
              public function Connector(data:Object = null)
              {
                   this.data = data;
              }
    
              public function get data():Object { return _data; }
    
              public function set data(value:Object):void
              {
                   _data = value;
                   draw(colorOff);
              }
    
              private function draw(color:uint = 0x000000):void
              {
                   if (_data) {
                        graphics.clear();
                        graphics.lineStyle(6, color);
                        graphics.moveTo(_data.start.x, _data.start.y);
                        graphics.lineTo(_data.end.x, _data.end.y);
                   }
              }
    
              public function set isActive(value:Boolean):void {
                   draw(value ? colorOn : colorOff);
              }
    
         }
    
    }
    

    Another new class Connectors.as - connectors container:

    package
    {
         import flash.display.Sprite;
         /**
          * Contains connectors.
          */
         public class Connectors extends Sprite
         {
              private var connectors:Object = { };
              public function Connectors()
              {
    
              }
    
              public function set connectorData(obj:Object):void {
                   var from:String = "c" + obj.from + "_" + obj.to;
                   var to:String = "c" + obj.to + "_" + obj.from;
                   if (!connectors[from] && !connectors[to]) {
                        var connector:Connector = new Connector(obj);
                        connectors[from] = connector;
                        addChild(connector);
                   }
              }
    
              public function activateConnector(from:int, to:int):void {
                   var connector:Connector = connectors["c" + from + "_" + to] ? connectors["c" + from + "_" + to] : connectors["c" + to + "_" + from];
                   if(connector) connector.isActive = true;
              }
    
         }
    
    }
    

    MazeNode.as's changes:

    package
    {
         import flash.display.Graphics;
         import flash.display.Shape;
         import flash.display.Sprite;
         import flash.events.Event;
         import flash.events.MouseEvent;
         /**
          * Maze node. Holds images.
          *
          */
         public class MazeNode extends Sprite
         {
              private var _radius:Number = 20;
              private var border:Shape;
              private var background:Shape;
              private var borderThickness:Number = 2;
              private var _borderColor:uint = 0x000080;
              private var _backgroundColor:uint = 0xffff00;
              private var _data:Object;
              private var _isInteractive:Boolean;
    
              private var _index:int = 0;
              /**
               * Place of the node in sequence
               */
              private var _sequenceOrdinal:int = 0;
              /**
               * Index of previous node in the game path
               */
              private var _prevIndex:int = -1;
              public function MazeNode()
              {
                   if (stage) init();
                   else addEventListener(Event.ADDED_TO_STAGE, init);
              }
    
              private function init(e:Event = null):void
              {
                   removeEventListener(Event.ADDED_TO_STAGE, init);
                   draw();
              }
    
              private function draw():void
              {
                   // make border and background separate objects so images can be placed in between
                   makeBackground(_backgroundColor)
                   // draw border
                   border = drawCircle(radius);
                   // because the shape is circle - mask the thing
                   var m:Shape = drawCircle(radius + borderThickness * 4, true);
                   addChild(background);
                   addChild(border);
                   addChild(m);
                   this.mask = m;
              }
    
              private function onClick(e:MouseEvent):void
              {
                   makeBackground(0x000000);
              }
    
              private function makeBackground(color:uint):void {
                   if(!background) background = new Shape();
                   var g:Graphics = background.graphics;
                   g.clear();
                   g.beginFill(color);
                   g.drawRect( -radius, -radius, radius * 2, radius * 2);
                   g.endFill();
              }
    
              private function drawCircle(raduis:Number, drawFill:Boolean = false):Shape {
                   var s:Shape = new Shape();
                   var g:Graphics = s.graphics;
                   g.lineStyle(borderThickness, borderColor);
                   if(drawFill) g.beginFill(0xff0000);
                   g.drawCircle(0, 0, radius);
                   g.endFill();
                   return s;
              }
    
              public function get radius():Number { return _radius; }
    
              public function set radius(value:Number):void
              {
                   _radius = value;
              }
    
              public function get borderColor():uint { return _borderColor; }
    
              public function set borderColor(value:uint):void
              {
                   _borderColor = value;
              }
    
              public function get backgroundColor():uint { return _backgroundColor; }
    
              public function set backgroundColor(value:uint):void
              {
                   _backgroundColor = value;
              }
    
              public function get data():Object { return _data; }
    
              public function set data(value:Object):void
              {
                   _data = value;
              }
    
              public function get isInteractive():Boolean { return _isInteractive; }
    
              public function set isInteractive(value:Boolean):void
              {
                   _isInteractive = value;
                   if (_isInteractive) addEventListener(MouseEvent.CLICK, onClick);
                   else removeEventListener(MouseEvent.CLICK, onClick);
              }
    
              public function get prevIndex():int { return _prevIndex; }
    
              public function set prevIndex(value:int):void
              {
                   _prevIndex = value;
                   // remove this index from data
                   var ar:Array = data.forwardNodes;
                   for (var i:int = 0; i < data.forwardNodes.length; i++)
                   {
                        if (ar[i] == _prevIndex) ar = ar.splice(i, 1);
                   }
              }
    
              public function get index():int { return _index; }
    
              public function set index(value:int):void
              {
                   _index = value;
              }
    
              public function get sequenceOrdinal():int { return _sequenceOrdinal; }
    
              public function set sequenceOrdinal(value:int):void
              {
                   _sequenceOrdinal = value;
              }
    
         }
    
    }
    

    This is our old friend MazeContainer.as:

    package
    {
         import com.greensock.TweenMax;
         import flash.display.Graphics;
         import flash.display.Shape;
         import flash.display.Sprite;
         import flash.events.Event;
         import flash.events.MouseEvent;
         import flash.geom.Point;
         /**
          * Container for maze objects.
          */
         public class MazeContainer extends Sprite
         {
              /**
               * Number of maze nodes
               */
              private var numNodes:int = 37;
              /**
               * Holds references to nodes.
               */
              private var nodes:Array;
              /**
               * Radius of node can be changed.
               */
              private var nodeRadius:Number = 25;
              /**
               * Distance between nodes.
               */
              private var nodesDistance:Number = 50;
              /**
               * Maximum rows.
               */
              private var maxRow:int = 5;
              /**
               * Line connecting nodes.
               */
              private var connectors:Connectors;
              /**
               * Holds nodes related data.
               */
              private var dataProvider:MazeConfiData;
              /**
               * Declare and reuse
               */
              private var node:MazeNode;
              /**
               * Sequence of indexes of consequent nodes.
               * This is where round's logic is stored.
               */
              private var gamePath:Array = [];
              /**
               * Figure
               */
              private var humanoid:Humaniod;
              private var nextIndex:int = 0;
    
              public function MazeContainer()
              {
                   if (stage) init();
                   else addEventListener(Event.ADDED_TO_STAGE, init);
              }
    
              private function init(e:Event = null):void
              {
                   removeEventListener(Event.ADDED_TO_STAGE, init);
                   dataProvider = new MazeConfiData();
                   numNodes = dataProvider.nodes.length;
                   connectors = new Connectors();
                   addChild(connectors);
                   createNodes();
                   placeNodes();
                   drawConnectors();
                   createGamePath();
    
                   humanoid = new Humaniod();
                   humanoid.cacheAsBitmap = true;
                   addChild(humanoid);
                   humanoid.offsetY = 15;
              }
    
              /**
               * Randomizes path from left to right.
               */
              private function createGamePath():void
              {
                   // node data
                   var forwardNodes:Array;
                   var nodeIndex:int = 0;
                   var prevIndex:int = 0;
                   // grab first node
                   node = nodes[0];
                   node.isInteractive = true;
                   node.addEventListener(MouseEvent.CLICK, onNodeClick);
                   gamePath.push(0);
                   while (node.data.forwardNodes.length > 0) {
                        // capture previous index to remove from the list of forwardNodes
                        prevIndex = nodeIndex;
                        // get forward nodes
                        forwardNodes = node.data.forwardNodes;
                        // get random index of nex node in sequence
                        nodeIndex = forwardNodes[int(forwardNodes.length * Math.random())];
                        // remove the index of preceeding node from the list of forwardNodes
                        MazeNode(nodes[nodeIndex]).prevIndex = prevIndex;
                        // store sequence index in array
                        gamePath.push(nodeIndex);
                        // switch node to the nex in sequence so that we can read its attributes
                        node = nodes[nodeIndex];
                        // store node's index in sequence.
                        node.sequenceOrdinal = gamePath.length - 1;
                   }
              }
              /**
               * Makes next node in the path interactive.
               * @param     e
               */
              private function onNodeClick(e:MouseEvent):void
              {
                   node = MazeNode(e.currentTarget);
                   node.removeEventListener(MouseEvent.CLICK, onNodeClick);
                   node.isInteractive = false;
                   var mx:Number = node.x;
                   var my:Number = node.y - humanoid.offsetY;
                   // toactivate connectors
                   var toIndex:int = gamePath[e.currentTarget.sequenceOrdinal];
                   var fromInd:int =  toIndex > 0? gamePath[ e.currentTarget.sequenceOrdinal - 1]: 0;
                   connectors.activateConnector(fromInd, toIndex);
                   // get next node to activate
                   nextIndex = e.currentTarget.sequenceOrdinal + 1;
                   if (nextIndex < gamePath.length) {
                        node = nodes[gamePath[nextIndex]];
                        node.addEventListener(MouseEvent.CLICK, onNodeClick);
                        node.isInteractive = true;
    
                   }
                   TweenMax.to(humanoid, .5, { x: mx, y: my, rotationY: 180 - humanoid.rotationY} );
              }
              /**
               * Calculates nodes coordinates and
               * places nodes on display list.
               */
              private function placeNodes():void
              {
                   // node data
                   var d:Object;
                   for (var i:int = 0; i < numNodes; i++)
                   {
                        node = nodes[i];
                        d = node.data;
                        node.y = d.row * nodesDistance;
                        node.x = d.column * nodesDistance;
                        addChild(node);
                   }
              }
              /**
               * Draws connectors between nodes.
               * This needs to be optimized or moved into a
               * separate class
               */
              private function drawConnectors():void
              {
                   // forward connector node
                   var fn:MazeNode;
                   var connectTo:Array;
                   // iterators
                   var i:int = 0;
                   var j:int = 0;
                   for (i = 0; i < numNodes; i++)
                   {
                        node = nodes[i];
                        connectTo = node.data.forwardNodes;
                        for (j = 0; j < connectTo.length; j++)
                        {
                             fn = nodes[connectTo[j]];
                             connectors.connectorData = { start: new Point(node.x, node.y), end: new Point(fn.x, fn.y), from: i, to: connectTo[j] };
                        }
                   }
              }
              /**
               * Creates MazeNode instances, configures them
               * and stores references to instances in nodes array.
               */
              private function createNodes():void
              {
                   var nodesData:Array = dataProvider.nodes;
                   nodes = [];
                   for (var i:int = 0; i < numNodes; i++)
                   {
                        node = new MazeNode();
                        node.data = nodesData[i];
                        node.index = i;
                        node.radius = nodeRadius;
                        node.backgroundColor = 0xffffff * Math.random();
                        nodes.push(node);
                   }
              }
    
         }
    
    }
    
  • Array.length changes not really after the item deleted?

    Frame 1, I loaded 9 clips (pieces of a chart) and their names of the instance (piece1, exhibit2 etc.) are in a table, arrPieces.   In 3, I'm trying to remove them, but I discovered that I had a problem with my while loop.   I removed the loop and discovered that the problem is really that the size of the array does not reduce after that I deleted an item.   I could not find it in the documentation.  Is this true?  I do not suspect.

    That's what I've stripped the code in frame 3 down for:

    trace (arrPieces.Length);     9 as planned
    var whichPiece = Math.floor (Math.random () * 9) + 1;
    arrPieces.splice(whichPiece,1);
    trace (whichPiece);   as expected
    trace (arrPieces);   as expected
    trace (arrPieces.Length);   still gives 9 - should not
    Stop();

    Something obvious, I suppose, but I can't.   Help appreciated.

    Marion

    I don't know what you've changed things in, but you can still get the random index duplicate values, though that if you are splicing to the table, then it should not matter.

    I don't know what else is going on in your code, or if you really need to remove the elements in the array, but you might consider randomizing just the array and then read through it, from 0 to 8.

  • Color sequence

    Hello everyone!
    A few days ago I postted here a topic to help me definine 4 colors and make them display randomly. The user derobinson send me this solution that works very well 'create an array that contains your predefined colors, then use the mathematical random function for a random index to use for your table which will give you your color defined at random. Something like this:

    var myArray:Array is ["0xFF0000", "0x00FF00", "0x0000FF"];.
    var randColor:String = myArray [random (3)];
    trace (randColor);

    So you should use the variable randColor everywhere where you set the color of your movie.

    OK, but randomly setting doesn't seem to be the best solution for my work, so I want to generate the colors on a sequence. But how do I do this? Any help? Thank you!

    "designu" wrote in message
    News:efjnim$DAQ$1@forums. Macromedia.com...
    > Hello World!
    > Yesterday I postted here a topic to help me definine 4 colors and make
    > display them randomly. The user derobinson send me this solution
    > who
    > works very well ' creates an array that contains your pre-defined colors then.
    > use
    > the mathematical random function for a random index to use for your table
    > who
    > will give you your color set at random. Something like this:
    >
    > var myArray:Array = ["0xFF0000", "0x00FF00", "0x0000FF"];
    > var randColor:String = myArray [random (3)];
    > trace (randColor);
    >
    > So you should use the variable randColor everywhere where you set the color in
    > your
    > movie.
    >
    > Ok, but the random setting does not seem to be the best solution for my
    > work,.
    > if I want to generate the colors on a sequence. But how do I do this? Any
    > help?
    > Thank you!
    >

    Do you mean, for example, with our values for myArray above, how would you
    that he could use the first BLUE, then GREEN then RED (or the order you put them
    en) as opposed to the randomness?

    If so, then instead of using random, you just need to follow your index. For
    for example...

    var myArray:Array = [0xFF0000, 0x00FF00, 0x0000FF];
    var myArrayIndex:Number = 0;

    What logic allows you to define when a color change should would then
    include the following.

    myArrayIndex += 1;
    % myArrayIndex = myArray.length; This will keep myArrayIndex between 0
    and your length of array - 1 (final clue)

  • Embedded index is randomly removed

    Hello I'm using Adobe acrobat pro XI and I have a document with more than 1000 pages and im using the new embed feature to make searches faster. However after I created an embeded index it will be random are sometimes deleted (the dialog box shows that "the document does not contain an embedded index")

    Any help?

    Thank you

    A common way to lose an embedded index is to do a "save under" on the PDF file.

    This provides the PDF file with the feature of quick web display but the losses the index incorporated.

    Be well...

  • 22 Firefox on Windows 8 crashes randomly

    I use Firefox 22 on a box of Windows 8 fully patched 64-bit. Since July 11, when I installed the latest version of Windows and Flash updates, Firefox has been crashing repeatedly and randomly, sometimes when I opened a new page, sometimes when I leave just the window open while I'm doing something else. All my modules and plugins are fully patched. Java is disabled but JavaScript is enabled (subject to NoScript).

    I tried:
    -Disabling hardware acceleration (did not help);
    -in the course of running in SafeMode (did not help); and
    -(basée sur une proposition dans un thread, je ne peux pas trouver maintenant) affecting FALSE (helped for a while but then started fails again) dom.ipc.plugins.flash.subprocess.crashreporter.enabled. I have reset it for true.

    Links to three recent accidents:
    - https://crash-stats.mozilla.com/report/index/bp-0345a784-eabf-43c7-aa09-1bd832130717
    - https://crash-stats.mozilla.com/report/index/bp-f9ce9bc0-995f-431e-bbf2-9c6072130717
    - https://crash-stats.mozilla.com/report/index/bp-e96b54e4-1494-4adb-bad9-162c02130716

    Thanks in advance!

    Incident reports do not appear to involve Flash, but since Flash is so prevalent on the web, a little Flash hygiene might be a good idea until he moved to.

    It is a standard orientation that addresses the most common questions. I'm sure you've seen some of it before, but just in case:

    (1) make sure that all recorders/downloaders who interact with the Flash media are as up-to-date as possible, or turn them off.

    (2) disable graphics hardware acceleration in Firefox and Flash

    (A) in Firefox, uncheck the box here and restart:

    the button Firefox orange (or the Tools menu) > Options > advanced > General > "use hardware acceleration when available.

    (B) in Flash, see this article from Adobe technical support: http://helpx.adobe.com/flash-player/kb/video-playback-issues.html#main_Solve_video_playback_issues

    (3) turn off protected mode (Windows Vista/7/8)

    See this article from Adobe support under the heading of 'Last resort': Adobe Forums: how to fix protected Flash Player for Firefox mode?

  • Firefox crashes randomly displaying webistes

    Only at random, 13 Firefox crashes when visiting a Web site. I checked for malware, and there is none. Safe mode means the same question. In addition, there are a few problems where Firefox would just stop responding. He wouldn't say no does not, but the program just hangs and I have to go into the Task Manager and kill the process. The new flash update would have something to do with it? Flash 11.3 due to serious problems with Firefox.

    This is a problem with the Flash plugin

    You can check the problems caused by a recent update of Flash 11.3 and possibly upgrade to Flash 11.2 or 10.3.

  • I get random redirects and fear that I was hacked. How will I know if this is indeed the case, and if so, how can we solve this problem?

    Sometimes, when I click on a link, I redirected to "Browse" gives me a list of links that may or may not have something to do with my research. Also, I play an app on Facebook and feel hella GAL have also been redirected away to randomly selected sites.

    Make a check of malware with some scan of malware programs.

    You need to scan with all programs, because each program detects a different malicious program.

    Make sure that you update each program to get the latest version of the database prior to scanning.

    See also 'Spyware on Windows': http://kb.mozillazine.org/Popups_not_blocked and what to do when searches take you on the wrong search site

  • random clock speeds, lurchy video games, unplayable?

    First post very Hi, don't see anything similar on here so here goes...

    About 2 weeks ago my 1066NR HP Envy 15 (1st generation) began to give me a few problems, and I was not able to understand what the matter is and was hoping someone would be able to help me.

    Essentially, probably about 80% of all has restarted, the system turns strangely, but 20%, it seems pretty normal.  By funny I mean, say I load a video, any format in any player, it's jerky, and the sound is choppy.  I try to load SWTOR, my FPS says this is normal and the game seems actually quite smoothly, but I'm idling, not like slow motion low fps I know what it sounds like to, but it looks like I'm using a speed hack and I have my speed set at 50% or something (I'm not (, of course).  What is more strange is, when my system is this way, if I go into the windows experience index, and re-run the assessment, my numbers of drastic change.  I'm not talking a 0.1 point I had an extra program that is running for change, I'm talking from 4.8 to 7.9.  It's almost like my computer is overclocking the hell out of my whole system, and then she just can't handle what he made and it causes trolling.

    I tried a new ram HDD/SSD, different, fresh install of w7, even basic thermal paste to both gpu and cpu incase for some reason, it was a heating problem.  Tried former pilots of new drivers, flashed my bios to the new version and the old version, even tried useless things like swapping the monitor (I have 2 hp envy 15, so just cracked it open and swapped 'em for the hell of it, another system works beautifully).  I tried to install w8 on just to see if it is not happy with the OS, but there the vid card 4830 in it and I've just been unable to obtain w8 do not spit on me when he tries to load my video drivers.

    I tried every single Windows Update, tried with zero, etc.  The problem started apparently completely at random.  It is not like a "I installed it so happened" it just happened.  I tried install w7 that work with my other envy, pulled the HARD drive directly on thrown therein and it does, return switch and it works perfectly.

    The only thing I could find in fact that I can't understand how to diagnose/repair is... I tried to run a test of 3dbenchmark11, and he told me that my card is not compatible with dx11.  I guess since it comes with w7 is a card compatible dx11.

    Is it possible that my graphics card has become partially unwelded motherboard, and there just an unstable connection or something and it is the cause of the problems?  That was the case I think portable positioning would be more important, so no matter what, and if I get a good restart and it works normally remains normal running even if I move the laptop, so I would not * think * that's the problem...

    Holy crap I type much, long story short I am missing something?  Thank you!

    The CPU test failed on a bad reboot, so this does not coincide with a faulty processor.  CPU failures can cause the processor works and sometimes does not work properly.  To the extent where the log file is empty, I don't know if this is normal on a test has failed.

    Page 19 of this help document of Intel in detail how to run the test via the command prompt.  You can try to run the test via the command prompt, you should be able to browse the test and see the individual tests and the result.

    At this point, it seems more likely that the processor is a failure in view of all the steps that have been taken, symptoms and test of processor Intel failed.

  • WebServer on sbRIO

    Hey guys,.

    I'm doing a Web server on a 9636 application NOR sbRIO. I think I have all the required software installed on the target.

    I built the Web server specification building and I can see that the Web server deployed under the option 'Web Services deployed"of the Web site NOR based Configuration & Monitoring Tool (screenshot attached).

    I joined a demonstration project, which is the target of sbRIO with a "static" (including index.html) file and the Web server for Build specification. The deployed Web server is illustrated in the attached screenshot. When I try to open 192.168.1.180/RIO_WebService/static/index.html, I get a 404 error.

    You have any suggestions, why I can not open the index.html page?

    I almost forgot: with the same exact configuration steps, I can deploy and reach the Web server on your desktop without any problem.

    I hope I made clear what the problem is. I you need additional information, please ask!

    Thanks in advance,

    Norbert

    Hi Norbert and welcome to the Forums EITHER!

    Have you tried accessing it using the port configured on the Web Application Server? So in your case, 192.168.1.180: 8080/RIO_WebService/static/index.html or something similar.

    The web service Setup seems good.

    Kind regards:

    Andrew Valko

    NOR Hungary

  • Choose a random element of array 2D

    I have a 2D integer array. I want to randomly select an element of the array. It's easy - just generate 2 random numbers and the array index.

    Here is the twist. I want to be more likely to be chosen over their value is compared to the rest of the elements of the elements. It is a memory game.

    If all items contain the same value the probability of a being selected is the same as any other. If an element has a value greater than all the others, then it is most likely to be chosen. If an element has a value less than all the others, then it is less likely to be chosen. Finally if an element contains a value of zero, then it will be never chosen.

    The only way I can think to do is by using a table 1 d of the clusters of x and y to be used for indexing table 2D. I would like to browse the table 2D. For each item, I read the value and which create several x, y clusters blacklisted in course and insert them into the 1 d of the index table. Now I just generate a random number of the 1 d array index, then the 2D of the index table. I'd probably have to "shuffle" 1 d of the index table, would I?

    It seems a bit Rube Goldberg and I hope someone can come up with a simpler method.

    This is a project very rough. Modify if needed.

    (probably need a few tweaks)

  • DMA FIFO - random values?

    iHi.

    My apologies if this is the wrong Board... not sure where it should go! Just to clarify from the outset, I cannot share screws due to issues of IP etc... sigh.

    Basically I have a sbRio 9626 and the software that runs on the FPGA to interface with analog converters / digital external. This is done using a machine to States (single cycle loop timed with a structure of business inside, so it passes between cases each tick of the clock FPGA). In one of the cases (the States), I have a little routine that takes data from the ADC and place it in a buffer FIFO of DMA of target-to-host. In fact, there are 4 FIFO DMA buffers to send various information and the value of the sample. It is then read by the software on the host of RT and processed to produce an array of values which I then send to the PC using a shared variable.

    What I wanted to check, is that data sent from FPGA to RT host (and PC) are contiguous (that is, I have my right to lengths FIFO). I modified the code FPGA to use a counter instead of the data sampled for the FIFO must simply send numbers in a sequence (1, 2, 3, 4, etc.). I then examine this sequence to ensure that it is correct, and no data has been overwritten.

    I think it's the FIFOs, 2, 3 and 4 are very good. FIFO 1 sends data that is continuous but every now and then I seem to get a glitch at random. This glitch is * not * appear to be due to lengths of FIFO, but seems to be an error in the data transfer. For example, I get something like 1, 2, 3, x, 5, 6, 7, y with x and y the seemingly random values. The positions x and y in the sequence are also seemingly random - they have not held in the same place every time. Code written to the FIFO 1 is * exactly * the same thing others - in fact, it's the same group of data being written.

    Has anyone seen anything like this before? I am trying to determine if it is due to the goal to receive FIFO or some problem with the shared variable in the network. Any suggestions as to what I could check? It almost seems as if there is IME peaks on the transfer... does not suggest this is the case but it gives an idea of what I see. I'm using Labview 2013 and BIOS on the sbRio is up-to-date. I have sbRio another I'll try again later to see if the problem is specific to a particular board.

    It seems that you have found the wrong path here: since you are dealing with the programming of FPGA, which is essentially played woth LabVIEW you should post this question to the Office of LabVIEW or, perhaps, to the Office LabVIEW Embedded

Maybe you are looking for