Cmi.suspend_data element size

Our LMS - SkillPort - has asked us to change the
cmi.suspend_data element for one of our courses (mainly a quiz) to
4096. They say it's over 5800 characters.
I'm not familiar with the cmi.suspend_data setting. How do
you access it? How do you change it? My colleague suggests that
it's probably automatically generated when we work through the
"SCORM 1.2 RTE" step of the SkillPort Compatibility Toolkit.
Have you run into any issues regarding cmi.suspend_data ?
What can you recommend?
Thank you!

I don't know if the error can be ignored without issue. If
their LMS is
reporting that the amount of data the lesson is trying to
send is too
large, it may not save any of it. Or even if it does, it may
only save
the first 4096 bytes...so when that data is sent back to the
LMS on
resume, it will be incomplete (and cause problems with the
lesson's
resume/playback?).
If the LMS is just reporting the field is too long but saves
it all
anyway then, yes, I'd suspect you could ignore the error
without
ill-effect (?).
I'm not sure what aspects of the CP Quiz Preferences come
into play
here. As Rick suggests, checking "Never send Resume Data"
would make
sense in this case, as the suspend_data field *should be*
specifically
used for the lesson to load back-in any data it collected on
a previous
launch.
There are other SCORM fields/variables for the lesson to send
quiz data
and results to the LMS. The status and score should NOT be a
part of
that suspend_data tracking. In fact, the LMS wouldn't even be
able to
report those results if the CP lesson was sending back status
and score
in that field.
SO my guess is you can indeed check that "Never send Resume
Data" option
and still get the results you need, especially if bookmarking
is not
something you want to happen - so every time users launch
this lesson,
it will be like they're launching it for the first time (as
far as the
lesson itself appears to the user).
IF that doesn't work and for some reason checking that option
does
affect the tracking you need then, yes, the next best option
would be to
reduce the number of questions so the amount of info in that
suspend_data field is reduced.
Finally, tracking interactions will significantly add to the
suspend_data field, I suspect, as I think that means the
lesson sends
the question text and the selected answer back to the LMS (so
'shorter'
questions' may work but less-likely?)
HTH!
Erik
Janatwork wrote:
> -- Since the purpose of "suspend_data" is to track
things BETWEEN SESSIONS,
> could I and SkillPort simply ignore the 5800 - 4096 size
conflict, since we are
> requiring the learners to complete the quiz in ONE
session (i.e., they cannot
> bookmark it and come back later).
> do you mean "reduce the number of quiz
> questions"? (My course has 36 questions) Or do you mean
"make the questions
> shorter"?
Erik Lord
http://www.capemedia.net
Adobe Community Expert - eLearning
http://www.adobe.com/communities/experts/
http://www.awaretips.net -
Authorware Tips!

Similar Messages

  • Cmi.suspend_data question

    Hi all,
    I am new to SCORM and am trying to track progress in an AS2 flash program and pass the info to cmi.suspend_data.  I wanted to create an array with as many elements as I have videos, and whenever a video has completed playing, change the value of the element associated to the video from 0 to 1. Once/If all elements of array == 1, then the program status would change to 'complete'. My issue is saving the array to cmi.suspend_data? I read that you can only pass strings, so I was hoping someone  would have suggestions as to how to track this user activity with cmi.suspend_data.
    Thanks!

    I’m doing something similar for a home-built LMS. That is, we want to capture and store what people say in free-form quiz fields. While the answer is embedded in the cmi.suspend_data info, it appears a better way to get it is from the cmi.interactions.*.learner_response info (assuming the module was published with the "report interactions" option, and your LMS asks for the data and does something with it).
    For example, when the Presenter Flash module starts up, it calls our LMS with this method:
    GetValue("cmi.interactions._children")
    ...and our LMS responds with the string:
    id,type,learner_response,result
    Later, on the slide that has the free-form quiz field, the Presenter module calls our LMS with this method:
    SetValue("cmi.interactions.0.learner_response","this is the answer")
    ...where 0 represents it was the first quiz, and "this is the answer" was what I typed in the free-form field. Now, our LMS just has to do something with that value (write it to the database, etc.).
    The one problem I’ve run into is when the user types double quotes or newlines in the free-form answer. When Presenter internally constructs the JavaScript to call SetValue of our LMS, it doesn’t seem to properly escape the quotes or newlines, and you end up with a JavaScript parse error in the browser (evident from Firebug) and the SetValue method is never called (so you lose the response). Maybe this is just a problem related to our custom-built LMS, but I suspect more that it is a bug in how the Presenter Flash module communicates between its Flash system and the JavaScript environment of the enclosing HTML page. (This is happening in the 7.0.5 version.)

  • LMS / Scorm not updating the "cmi.suspend_data"

    Hi Guys,
    Dont know if anyone can help me but i am trying to get my Flash program to work with a LMS using SCORM.
    At the end of the module all i want to do is update the string.  It traces fine in Flash but doesnt actually update the LMS
    This should update a string when a module is complete. The code is below and any help would be great
    package classes
    import com.pipwerks.SCORM;//for SCORM support
              import classes.Main;
              import flash.display.MovieClip;
              import flash.events.*;
              public class ScormCode extends MovieClip
                        private var scorm:SCORM;
                        private var lmsConnected:Boolean;
                        private var lessonStatus:String;
                        private var success:Boolean;
                        public var VarLMSErrorMc:Boolean = false;
                        public var userFirstnameString:String = "";
                        public var completedModule:Boolean;
                        //Variable that is ticked once a page is COMPLETE
                        public var modulecompleted:Object = {
                        module1: 0,
                        module2: 0,
                        module3: 0,
                        module4: 0
                        public function ScormCode()
                                  trace("SCORM Intialized");
                                  //Initialize SCORM object (pipwerks SCORM class)
                                  scorm = new SCORM();
                                  //Connect to LMS. Can only be done ONCE.
                                  lmsConnected = scorm.connect();
                                  //Ensure connection was successful before continuing.
                                  if (lmsConnected)
                                            //Get course status
                                            lessonStatus = scorm.get("cmi.core.lesson_status");
                                            //Setup username
                                            var username_data:String = scorm.get("cmi.core.student_name");
                                            var splitter:Array = username_data.split(" ");
                                            var firstName:Object;
                                            firstName = splitter[0];
                                            userFirstnameString = String(firstName);
                                            //If course has already been completed, kill connection
                                            //to LMS because there's nothing to report.
                                            if (lessonStatus == "completed" || lessonStatus == "passed")
                                                      //DO SOMETHING
                                                      modulecompleted.module1 = 1;
                                                      modulecompleted.module2 = 1;
                                                      modulecompleted.module3 = 1;
                                                      modulecompleted.module4 = 1;
                                                      completedModule = true;
                                                      //Set course to complete
                                                      success = scorm.set("cmi.core.lesson_status","completed");
                                                      scorm.save();
                                                      scorm.disconnect();
                                            else
                                                      //If course has NOT been completed yet, let's
                                                      //ensure the LMS knows the course is incomplete
                                                      //by explicitly setting status to "incomplete"
                                                      success = scorm.set("cmi.core.lesson_status","incomplete");
                                                      var suspend_data:String = scorm.get("cmi.suspend_data");
    //Is suspend_data empty? Check the length of the returned string.
                                                      //If there's nothing saved, the LMS will return an empty string ""
                                                      if (suspend_data.length > 0)
                                                                //suspend_data is not empty, so we must have
                                                                //saved something in the last course attempt.
                                                                //Remember, we saved a our progress variables in
                                                                //a comma-delimited string; we can convert to an
                                                                //array using string.split(",").
                                                                var arrModulecompleted:Array = suspend_data.split(",");
                                                                //Assign the value to each of our planets.
                                                                //Be sure to convert string "1" to integer 1.
                                                                //The order of the array items was specified in
                                                                //saveCourseStatus() when we created the
                                                                //comma-delimited suspend_data string.
                                                                modulecompleted.module1 = parseInt(arrModulecompleted[0],10);
                                                                modulecompleted.module2 = parseInt(arrModulecompleted[1],10);
                                                                modulecompleted.module3 = parseInt(arrModulecompleted[2],10);
                                                                modulecompleted.module4 = parseInt(arrModulecompleted[3],10);
                                                      saveCourseStatus()
                                  else
                                            /* VarLMSErrorMc = true;*/
                                            //Ruh-roh...
                                            trace("Could not connect to LMS.");
                        public function checkComplete():void
                                  if (modulecompleted.module1 && modulecompleted.module2 && modulecompleted.module3 && modulecompleted.module4)
                                            setCourseToComplete();
                                            completedModule = true;
                                            trace("COURSE NOW COMPLETED!!!");
                                  else
                                            trace("COURSE NOT COMPLETED YET__________________________________________^^^^^");
                                            trace("M1: " + modulecompleted.module1 + ", M2: " + modulecompleted.module2 + ", M3: " + modulecompleted.module3 + ", M4: " + modulecompleted.module4);
                                            saveCourseStatus();
                        public function setCourseToComplete():void
                                  //Set lesson status to completed
                                  success = scorm.set("cmi.core.lesson_status","completed");
                                  //Ensure the LMS persists (saves) what was just sent
                                  scorm.save();
                                  //Disconnect from LMS;
                                  scorm.disconnect();
                        public function saveCourseStatus():void
                                   var suspend_str:String = modulecompleted.module1 + "," + modulecompleted.module2 + "," + modulecompleted.module3 + "," + modulecompleted.module4;
                                  //Send suspend_data string to LMS
                                  trace("M1: " + modulecompleted.module1 + ", M2: " + modulecompleted.module2 + ", M3: " + modulecompleted.module3 + ", M4: " + modulecompleted.module4);
                                  scorm.set("cmi.suspend_data", suspend_str);
                                  //Ensure the LMS persists (saves) what was just sent
                                  scorm.save();

    Hi Guys,
    Dont know if anyone can help me but i am trying to get my Flash program to work with a LMS using SCORM.
    At the end of the module all i want to do is update the string.  It traces fine in Flash but doesnt actually update the LMS
    This should update a string when a module is complete. The code is below and any help would be great
    package classes
    import com.pipwerks.SCORM;//for SCORM support
              import classes.Main;
              import flash.display.MovieClip;
              import flash.events.*;
              public class ScormCode extends MovieClip
                        private var scorm:SCORM;
                        private var lmsConnected:Boolean;
                        private var lessonStatus:String;
                        private var success:Boolean;
                        public var VarLMSErrorMc:Boolean = false;
                        public var userFirstnameString:String = "";
                        public var completedModule:Boolean;
                        //Variable that is ticked once a page is COMPLETE
                        public var modulecompleted:Object = {
                        module1: 0,
                        module2: 0,
                        module3: 0,
                        module4: 0
                        public function ScormCode()
                                  trace("SCORM Intialized");
                                  //Initialize SCORM object (pipwerks SCORM class)
                                  scorm = new SCORM();
                                  //Connect to LMS. Can only be done ONCE.
                                  lmsConnected = scorm.connect();
                                  //Ensure connection was successful before continuing.
                                  if (lmsConnected)
                                            //Get course status
                                            lessonStatus = scorm.get("cmi.core.lesson_status");
                                            //Setup username
                                            var username_data:String = scorm.get("cmi.core.student_name");
                                            var splitter:Array = username_data.split(" ");
                                            var firstName:Object;
                                            firstName = splitter[0];
                                            userFirstnameString = String(firstName);
                                            //If course has already been completed, kill connection
                                            //to LMS because there's nothing to report.
                                            if (lessonStatus == "completed" || lessonStatus == "passed")
                                                      //DO SOMETHING
                                                      modulecompleted.module1 = 1;
                                                      modulecompleted.module2 = 1;
                                                      modulecompleted.module3 = 1;
                                                      modulecompleted.module4 = 1;
                                                      completedModule = true;
                                                      //Set course to complete
                                                      success = scorm.set("cmi.core.lesson_status","completed");
                                                      scorm.save();
                                                      scorm.disconnect();
                                            else
                                                      //If course has NOT been completed yet, let's
                                                      //ensure the LMS knows the course is incomplete
                                                      //by explicitly setting status to "incomplete"
                                                      success = scorm.set("cmi.core.lesson_status","incomplete");
                                                      var suspend_data:String = scorm.get("cmi.suspend_data");
    //Is suspend_data empty? Check the length of the returned string.
                                                      //If there's nothing saved, the LMS will return an empty string ""
                                                      if (suspend_data.length > 0)
                                                                //suspend_data is not empty, so we must have
                                                                //saved something in the last course attempt.
                                                                //Remember, we saved a our progress variables in
                                                                //a comma-delimited string; we can convert to an
                                                                //array using string.split(",").
                                                                var arrModulecompleted:Array = suspend_data.split(",");
                                                                //Assign the value to each of our planets.
                                                                //Be sure to convert string "1" to integer 1.
                                                                //The order of the array items was specified in
                                                                //saveCourseStatus() when we created the
                                                                //comma-delimited suspend_data string.
                                                                modulecompleted.module1 = parseInt(arrModulecompleted[0],10);
                                                                modulecompleted.module2 = parseInt(arrModulecompleted[1],10);
                                                                modulecompleted.module3 = parseInt(arrModulecompleted[2],10);
                                                                modulecompleted.module4 = parseInt(arrModulecompleted[3],10);
                                                      saveCourseStatus()
                                  else
                                            /* VarLMSErrorMc = true;*/
                                            //Ruh-roh...
                                            trace("Could not connect to LMS.");
                        public function checkComplete():void
                                  if (modulecompleted.module1 && modulecompleted.module2 && modulecompleted.module3 && modulecompleted.module4)
                                            setCourseToComplete();
                                            completedModule = true;
                                            trace("COURSE NOW COMPLETED!!!");
                                  else
                                            trace("COURSE NOT COMPLETED YET__________________________________________^^^^^");
                                            trace("M1: " + modulecompleted.module1 + ", M2: " + modulecompleted.module2 + ", M3: " + modulecompleted.module3 + ", M4: " + modulecompleted.module4);
                                            saveCourseStatus();
                        public function setCourseToComplete():void
                                  //Set lesson status to completed
                                  success = scorm.set("cmi.core.lesson_status","completed");
                                  //Ensure the LMS persists (saves) what was just sent
                                  scorm.save();
                                  //Disconnect from LMS;
                                  scorm.disconnect();
                        public function saveCourseStatus():void
                                   var suspend_str:String = modulecompleted.module1 + "," + modulecompleted.module2 + "," + modulecompleted.module3 + "," + modulecompleted.module4;
                                  //Send suspend_data string to LMS
                                  trace("M1: " + modulecompleted.module1 + ", M2: " + modulecompleted.module2 + ", M3: " + modulecompleted.module3 + ", M4: " + modulecompleted.module4);
                                  scorm.set("cmi.suspend_data", suspend_str);
                                  //Ensure the LMS persists (saves) what was just sent
                                  scorm.save();

  • Se51 - maximum element size reached

    Hi
    I've a screen and i need to upper size of window, but appears msg "maximum element size reached".
    I try seek in forum but i didn't find an answer.
    Can somebody tell me how i change the maximum size ?
    Thanks

    Check this thread :
    Re: Selection-screen problem only when in SE80

  • Question about cmi.suspend_data coding scheme

    I'm trying to determine whether the actual text entered in short answer quiz questions in Presenter 7 online presentations can be extracted.  We want to review the answers themselves, not just whether the student got the answer right.  In discussing this with my LMS vendor, they said that they would need to understand how the SCORM data, specifically the cmi.suspend_data, is structured to determine whether we could develop a means to report actual answers.  If I can put my hands on it, I need the coding scheme, including how data is delimited, and how the data is ordered.  Is this kind of information documented somewhere such that I could obtain it?

    I’m doing something similar for a home-built LMS. That is, we want to capture and store what people say in free-form quiz fields. While the answer is embedded in the cmi.suspend_data info, it appears a better way to get it is from the cmi.interactions.*.learner_response info (assuming the module was published with the "report interactions" option, and your LMS asks for the data and does something with it).
    For example, when the Presenter Flash module starts up, it calls our LMS with this method:
    GetValue("cmi.interactions._children")
    ...and our LMS responds with the string:
    id,type,learner_response,result
    Later, on the slide that has the free-form quiz field, the Presenter module calls our LMS with this method:
    SetValue("cmi.interactions.0.learner_response","this is the answer")
    ...where 0 represents it was the first quiz, and "this is the answer" was what I typed in the free-form field. Now, our LMS just has to do something with that value (write it to the database, etc.).
    The one problem I’ve run into is when the user types double quotes or newlines in the free-form answer. When Presenter internally constructs the JavaScript to call SetValue of our LMS, it doesn’t seem to properly escape the quotes or newlines, and you end up with a JavaScript parse error in the browser (evident from Firebug) and the SetValue method is never called (so you lose the response). Maybe this is just a problem related to our custom-built LMS, but I suspect more that it is a bug in how the Presenter Flash module communicates between its Flash system and the JavaScript environment of the enclosing HTML page. (This is happening in the 7.0.5 version.)

  • Dreamweaver 8 - does not always render content correctly when element sizes are specified as %s

    Hi,
    I'm using DW 8 and am changing CSSs to specify element sizes as %s - a move towards responsive design. Browsers that I've tried - Firefox, Chrome, IE and Safari - render the results correctly but DW does not always render correctly: it seems to have particular problems in calculating and showing margins and padding. Does anybody know whether this is a known fault? Am I asking too much of an old version of the system? Or am I missing something else somewhere along the way?
    Thanks,
    Andrew

    andywalmsley wrote:
    Hi,
    Am I asking too much of an old version of the system? Or am I missing something else somewhere along the way?
    Yes, Dreamweaver design view, whilst quite good, did and still does not represent the css you write 100% accurately.
    The more complex the css the less likely it is to render as you would expect.
    I've come to rely less and less on design view over the past months as ways and means of producing websites advance leaving DW some way off the pace, it always has been.
    I have not tested out CC2014 but would suspect its an improvement over past versions at showing css in design view but still behind the curve.

  • How do I programmat​ically modify array element sizes?

    Hi All,
    I have a quick question about modifying the size of array elements. Hopefully someone can help, because I am at a dead end!
    I am logging some intensities from a Fibre Array using a camera. For calibration of the system, I acquire an image from the camera, click points on the image to divide it into areas of interest. I overlay my image with a grid showing the regions of interst - for example a 4x6 array. I then have to select the fibres - or ROIs - I want to log from.
    I have a cluster type-def ( a number and a boolean) to specify the fibre number and to turn logging from that fibre on/off. I overlay an (transparent) array of this typedef over my image to correspond with the regions of interest. So here's my problem - I want to modify the dimensions of the array so each control matches my ROI. I can resize the elements by rightclicking on the elements on the frontpanel, but can't find a way to do it programmatically. The Array Property Node>>Array Element>>Bounds won't 'change to write'...thats the first thing I tried.
    Its really only important that the elements align with my ROIs - so programmatically adding in gaps/spacings would also work for me...but again I can't figure out how to do this! I've attached a screenshot of part of my image with array overlaid to show you all exactly what my problem is.
    Thanks in advance for you help,
    Dave
    PS I am running Labview 8.6 without the vision add on.
    Solved!
    Go to Solution.
    Attachments:
    Array_Overlay.png ‏419 KB

    Here's my cheat (and cheap?) way If you want to get fancy and center the numeric and boolean indicators, you could add spacers on the north and west sides, too.
    Attachments:
    ClusterSpacer.vi ‏13 KB

  • Using document.getElementById to change an element size works in iWeb but not when site published

    I am trying to use an HTML snippet to construct a "popup" to show explanatory text on iWeb windows. This is the code:
    <div id="divName"></div>
    <style type="text/css">
    /*<![CDATA[*/
    #divName {
         border:solid 0px #000;
         text-align:left;
    /*//]]>*/
    </style>
    <script type="text/javascript">
    //<![CDATA[
    function mouseOver()
        var el=document.getElementById("divName");
                       el.style.width=400+"px";
                       el.style.height= 200+"px";
                       el.style.margin="auto";
                           el.style.backgroundColor="#ffffff";             
              el.innerHTML="this is a bit of text, and this is some more";
    function mouseOut()
        var el=document.getElementById("divName");
                       el.style.width=80+"px";
                       el.style.height= 20+"px";
                       el.style.margin="auto";
              el.innerHTML=" ";
                           el.style.backgroundColor="";             
    window.onload=mouseOut;
    window.onmouseover=mouseOver;
    window.onmouseout=mouseOut;
    //]]>
    </script>
    This works o.k. when tested inside iWeb. When the mouse is rolled over the element it is enlarged, the background colour changed and the text displayed. However, when I publish the site the background colour changes and the text is displayed BUT the size of the element remains set to the size set in the "mouseOut" function. On one occasion after publishing it did actually work, but mostly it doesn't!
    What am I doing wrong?
    Incidentally, when testing under iWeb, the mouseOut function sometimes doesn't shrink the element back to its original size. Mostly it does, but when it doesn't the background has still been made transparent and the text removed. It only appears to be the height and width functions that are failing!

    Here's how I started :
    http://www.wyodor.net/Ajax/Ajax.html
    But to avoid having to edit the page after editing the iWeb page, i figured out a way to do it with a JavaScript :
    http://www.wyodor.net/mfi/Maaskant/How_To.html
    The magic word is : unique word. Then replace it with your own code.
    Then I advanced it a bit to this :
    http://www.wyodor.net/_Demo/Fancy/Dynamic_Text.html
    And here's an explanation what the HTML Snippet does :
    http://www.wyodor.net/blog/archives/2009/07/entry_213.html
    You may have to learn HTML/CSS/JavaScript/DOM/AJAX and how iWeb creates its pages.

  • Background Element Size issue in Column Chart

    Hi All,
    I am trying to add multiple chart to hbox dynamically with each chart having vbox as an background element and only first and last chart is having axis.
    for example shown in below image three column chart are getting added out of which second chart dosn't contain either axis on left or right.
    I am facing a problem in making background element of same size means there should not be size difference as shown below:
    How can i make all the vboxes that i have used of same size ?
    Thanks in advance.

    Spacing is done based on the number of columns in the chart. It is better to use one chart and group the data accordingly. It is possible to add multiple axis for a chart

  • Optional CMI elements for SCORM 1.2

    I've been working on some e-learning training adding necessary SCORM coding for a designer. At first, the modules were to run under Moodle but now it seems that OLM is to be used. Having never used this before and not yet having access to the LMS, I'm trying to find some answers to what are probably daft questions.
    1. The client keeps referring to the LMS as Oracle, but there appears to be iLearning and OLM - are these different?
    2. I know that OLM is SCORM 1.2 compliant, but the modules have been created use the optional cmi.objective elements and I cannot find any technical specification that states whether these elements and / or other optional elements are available.
    Regards,
    Mack

    1. Yes. iLearning is a standalone application separate from the Oracle eBusiness Suite that integrates with other systems via webservices. Oracle Learning Management (OLM) is a native Oracle eBusiness Suite Product that is integrated module of the Oracle HR Suite of products (shared tables etc)
    2. Oracle Learning Management supports the optional SCORM 1.2 objectives elements. The "Deploying e-Learning Content on Oracle Learning Management" white paper, available on My Oracle Support, discusses this and other relevant items.
    Scott
    http://www.seertechsolutions.com

  • Problem in Link size changes in theme editor of NWDS

    Hello All,
    We have created a theme in theme editor and the link size has to be matched with the given specifications.
    When trying to change the link size using Link Property - Standard Font Size to xsmall or any value such as 0.8 em, it is applied to all the other texts but not the links. Links are always in a slightly bigger font size.
    Please note that the links which are under consideration are within a table.
    The links outside the table are coming properly.
    Please help us find a solution for this.
    Thanks & Regards,
    Radhika

    Hi Radhika,
    There is two properties in Global Style Sheets area
    1. Base Font size.--> it is under common
    2. standard Font size.---> it is under Text in GSS
    if you change the Base Font size to X Small / XX Small the link size will be reduced but it will reduce the other UI element font
    size as well to overcome this( increase the other UI elements size) problem you have to increase the Standard Font size upto
    the requied font size is came to other UI elements.
    Thanks & Regards,
    Bhargava.

  • The menu bar and HUD elements are unusually large in FF 22.

    In the new version, the size of the menu bar and subsequent toolbars seems to have increased slightly. This also seems to have forced the icons on the toolbars to enlarge, causing them to be blurry as they are displayed in a lower resolution than normal.
    Additionally, the zoom level (text and element size) for many webpages has increased. Manually resetting with ctrl+scroll down works, and the pages retain their proper size, but it's frustrating to redo this for every webpage.
    I have checked that the text size setting in Options did not change.
    What can I do to undo this appearance change?

    see
    * https://support.mozilla.org/en-US/questions/959696
    * https://support.mozilla.org/en-US/questions/963035
    * https://support.mozilla.org/en-US/questions/963027
    * https://support.mozilla.org/en-US/questions/963010
    * https://support.mozilla.org/en-US/questions/962979
    * https://support.mozilla.org/en-US/questions/962990
    * https://support.mozilla.org/en-US/questions/963001

  • How to set the number of elements dequeued?

    Hello All,
    I am relatively new to LabView. I use LabView 8.2 to detect Joystick movement using a set voltage threshold. Totally, I have 6 channels of analog input. The sampling rate is 2 Kilo Hertz with continuous sampling mode (buffer size set to 10 Kilo Samples). I show a visual stimulus on a computer monitor. Within  3 seconds from stimulus onset, the subject has to press the joystick. So I use a while loop that runs until the subject moves the joystick in any direction as detected by crossing of voltage threshold. The while loop was intended to run for a max of 3 sec if joystick was not moved. My intention while using the vi (see below) was to continuously monitor the voltage signal by means of removing voltage data points from the queue by the labview function/vi - "dequeue element". When I dequeue from inside the loop, the dequeue function removes about 100 msec worth of voltage data points ( = 198-201 points; sampling rate -2Khz) from each of the six channels. This creates problem for me because a single dequeue operation takes 40 to 85 msec during which the loop cannot be stopped. This results in miscalculation of the actual time when the joystick was moved.
    Is there a way to set how many data points the dequeue function removes? My goal is to remove about 1-2 msec worth of data points so that the loop can exit within under 5msec of the joystick movement.
    I have attached the screen shots of the subvi's I am using.
    Acquire Response.jpg - the while loop that has the subvi: Access Analog Data Queue
    Access Analog Data Queue.jpg - front panel of the subvi that has the 'dequeue element' function.
    Remove Element.jpg - a case of Access Analog Data Queue.vi showing the 'dequeue element' function
    Sorry for the long message. Any help would be greatly appreciated.
    Thanks
    Mani
    Attachments:
    Remove Element2.jpg ‏135 KB
    Acquire Response1.jpg ‏266 KB
    Remove Element1.jpg ‏135 KB

    Hello Lynn and tst,
    Thanks for your suggestions. I have attached a screen shot of a vi that has the enqueue function. As Lynn pointed out, it was the enqueueing size that was reflected in the size of the dequeueing. I tried various ways to control the enqueue element size in order to control the dequeue element size. Many of my tricks failed. I had set the data acquisition to be continuous at 2kHz with 10Ks buffer size. You may want to look at the attached image of the subvi "Analog Acquisition" while I explain my attempts. The first thing that I noticed was the 'dt' value in the input node of the timed loop which had been set by somebody to 100. I thought that was part of the reason why my dequeue size was always worth 100msec data points. So I changed it to 1 msec. This definitely made a difference in the chunk size of the dequeued element. Now dequeueing removes only data points worth 1 - 5msec. I also noticed that my data reading timer loop(the while loop in "Analog Acquisition" picture) takes about 20 -25 msec instead of the set 1 msec.
    Why does the loop take so long? I have set the 'number of samples per channel' to -1 so that DAQmx read.vi (see it in Analog Acquisition subvi block diagram) can grab whatever data is available currently and put that into the queue. Can this be a reason why the loop takes more than 20 msec? I also tried to set the number of samples per channel to 2. I reasoned that with the sampling rate of 2KHz, 1ms loop should be able to pull 2data points and enqueue them. But it gave me the much-often-seen error code ":Error -200279 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi:1->Timed structure(s): DAQ Loop". I tried various combinations of loop time and number of samples per channel. I get Error-200279 very often. Note that I have several state transitions and only in a couple of them during every cycle of state transitions, I remove elements and flush the data queue (one place where I remove elements is shown in my original message in the picture-'Acquire Response.jpg').
    How do I set the data acquisition loop to enqueue elements for exactly 1 msec or n msec so that I can control my dequeue size?
    Thanks a lot, I am getting really tired of fixing this problem. Please help.
    Mani
    Attachments:
    Analog Acquisition.jpg ‏363 KB

  • Element Attributes

    Can attributes of a context element be accessed by index.
    I want to do something like:
    for(int i = 0; i < <element>.size;i++){
    //Assign values to each attribute

    Hi Gregory,
    You can do something like that:
    for(int i = 0; i < wdContext.nodeCustomer().size() ;i++){
           IPrivateIviewCustomer.ICustomerElement element = wdContext.nodeCustomer().getElementAt(i);
           String name = element.getName();
    Kind Regards,
    Luciano

  • Alv field size

    Hi all
           Please help me to solve this problem.I want to display the size of the coloumn heading eqaul to the data element size in alv.I am using below code at this moment.Explain to me step by step to solve this problem.
      layout-box_tabname   = 'ALV_FIELDS'.
      eventcat_ln-name = 'TOP_OF_PAGE'.
      eventcat_ln-form = 'TOP_OF_PAGE'.
      append eventcat_ln to eventcat.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND '
          i_structure_name         = 'FIELDCAT'
          is_layout                = layout
          it_fieldcat              = fieldcat
          i_default                = 'A'
          i_save                   = 'A'
          is_variant               = dvariant
          it_events                = eventcat
        tables
          t_outtab                 = alv_fields
        exceptions
          program_error            = 1
          others                   = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    Thanx in advance.
    Regards,
    Giri.

    while appending header fields to ALV, there is a field (length) wherein U can specify the length and it will be displayed accordingly. So, u can set the data element size to this field and use it.

Maybe you are looking for