Labview class data read node problems

I've been noticing some odd things when i use read\write nodes on labview class objects. 
It seems like at some point the link between the read node and what it's supposed to be doing gets broken - so that it reads out the 'default' value of the data than the actually written value.  I have worked out how to fix it when it happens - by deselecting the correct node, and then reseleecting it - seems to refresh whatever is happening underneath - although it is a pretty annoying bug.
It seems to have started happening in the last few months when i updated to LV2011 SP1 in code that had been unchanged for at least a year. (so LV2010).
I can't quite pin down the exact circumstances because it seems a bit transitory.  It seems to mostly happen after labview crashes - which seems to happen quite often in LV2011.  I have a feeling it might be especially when you do class inheritance.
Anybody else noticed this behaviour?  Have been wondering if I should avoid using these node read\writes, and go for the actual VIs.
JP

Hi JP,
Many thanks for your post. I have been using LabVIEW 2011 for a recent OOP project and not experience this behaviour so believe it could be an issue introduced in SP.1.
I have checked and this is not a known issue with LabVIEW 2011 SP.1. I have had a go at recreating the issue in SP.1 but have been unable. In order for me to report this as a known issue and ensure it gets rectified I need to be able to recreate the behaviour. If you are able to explain some steps to recreate the issue then this would be great. Alternatively, could you send me in a VI/project which has the issue?
If it seems to occur after a crash then I suspect the two are related and the key will be identifying what is causing LabVIEW to crash.
Best Regards.
Aaron. E
Applications Engineer Team Lead
National Instruments
ni.com/support

Similar Messages

  • Problem with combination of LabVIEW classes (dynamic dispatch), statechart module and FPGA module

    SITUATION:
    - I am developing a plug-in-based software with plug-ins based on LabVIEW classes which are instanced at run-time. The actual plug-in classes are derived from generic plug-in classes that define the interfaces to the instancing VI and may provide basic functionality. This means that many of the classes' methods are dynamic dispatch and methods of child classes may even call the parent method.
    - Top-level plug-ins (those directly accessed by the main VI) each have a run method that drives a plug-in-specific statechart.
    - The statechart of the data acquisition plug-in class (DAQ class) calls a method of the DAQ class that reads in data from a NI FPGA card and passes it on to another component via a queue.
    PROBLEM:
    - At higher sampling rates, an FPGA-to-host FIFO overflow occurs after some time. When I "burden" the system just by moving a Firefox browser window over the screen, the overflow is immediately triggered. I did not have this kind of problem in an older software, where I was also reading from an FPGA FIFO, but did not make use of LabVIEW classes or statecharts.
    TRIED SOLUTIONS (WITHOUT SUCCESS):
    - I put the statechart into a timed loop (instead of a simple while loop) which I assigned specifically to an own core (I have a quad-core processor), while I left all the other loops of my application (there are many of them) in simple while loops. The FIFO overflow still does occur, however. 
    QUESTION:
    - Does anybody have a hint how I could tackle this problem? What could be the cause: the dynamic dispatch methods, the DAQ statechart or just the fact that I have a large number of loops? However, I can hardly change the fact that I have dynamic dispatch methods because that's the very core of my architecture... 
    Any hints are greatly appreciated!
    Message Edited by dlanger on 06-25-2009 04:18 AM
    Message Edited by dlanger on 06-25-2009 04:19 AM
    Solved!
    Go to Solution.

    I now changed the execution priority of all the VIs involved in reading from the FPGA FIFO to "time critical priority (highest)". This seems to improve the situation very much: so far I did not get a FIFO overflow anymore, even when I move around windows on the screen. I hope it stays like this...

  • How to get a LabVIEW class object to expose an invoke-node method?

    Hi,
          I like the property/invoke-node "paradigm" used for interacting with "objects".  Can LabVIEW-class objects expose their properties and methods this way?  Can one or more LabVIEW-class objects be compiled into a library or "assembly" (or other distrubution format) that allows the property/invoke-node usage?
    I've looked at (but not completely understood) "Creating LabVIEW Classes".  Have also searched for related posts.
    The pic below shows an invoke node wired to a class with a Public VI "VAT.Status.Hello.vi".  I'd like to see VAT.Status.Hello show-up as a Method.  (I just tried "Select Method", and selected "VAT.Status.Hello.vi" but dialog's "OK" button stays greyed-out.)
    Cheers.
    Message Edited by tbd on 03-29-2007 03:15 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    VATStat.JPG ‏54 KB

    Hi Aristos,
          Thanks for the reply!  It was a bit dissappointing, though.
    It appears the LabVIEW-class object will be moving away from (what seems to me) a convenient object-interface presented by the invoke-node/method paradigm - which allows us to interface with a large set of "objects" (.NET, ActiveX, LabVIEW GUI, VISA Resource, ?) in a similar manner and independent of the object's origin.  Being able to read the methods and parameters that appear in these nodes is also helpful for understanding diagram logic!
    I do like the option of dropping a friendly "VI looking" icon on the diagram, but perhaps an optional - even default - VI-icon representation for a class-object invoke-node is feasible - so the LabVIEW class-object could be the more generic object first, but with a traditional-G representation(?)
    Given the answer "We would like, someday, to support the property node"
    and "in the next version of LV, wiring the LV class to the property/invoke nodes will break the wire so we'll avoid confusion in the future",
    ... I guess you'll break the wire in the next version, but (perhaps) allow it again - if support of the property node is ever implemented?
    Regards.
    P.S. For the record, huge THANKS to whoever it was that straightened-out enumerated-types (somewhere) between LV4.1 and LV6.1.  Every time I add or remove an enumeration in a typedef, I silently give thanks to the bright and thoughtful soul(s) who made this valuable tool work so well!
    Hello. This is your friendly neighborhood R&D guy for LabVIEW classes.
    Regarding your request about property and invoke nodes as relates to LV classes....
    Short story: We would like, someday, to support the property node. We have no intention of ever supporting the invoke node.
    Long story: As we were creating LV classes, we had to evaluate the right programming interface for these things. We wanted LV classes to behave as new data types in LV. A developer should be able to create a LV class, then give it to someone who doesn't even know OO programming, and that second programmer could use the new data type without learning a lot of new concepts. From this principle, we held fast to the idea that the programming interface should be subVI calls whereever possible. The invoke node is really nothing more than a VI minus the icon. If you want, you can popup on any subvi node and uncheck the option "View as Icon". This will make the node display in a way that has the terminals listed as text, like the invoke node. So, at the end of the day, the invoke node is simply a subroutine call in LV that is language dependent, as opposed to the language independent iconography of LV generally.
    The property node is a slightly different story -- the functionality of a property node is actually different than an invoke node as its terminals are various subsets of the properties available, not a fixed list of parameters like the invoke node. The property node provides a nice interface for setting multiple properties in a block and only having to check a single error return. Very friendly. Our intent is to allow you to create a VI that has 5 terminals: object in, object out, error in, error out, and either a single input or a single output of your chosen type. VIs with this conpane could be marked as "properties" of the class and would show up when you wire the class wire to the property node. We would call the subVIs behind the scenes as needed to get/set the properties.
    This is on the longer term roadmap because it is "syntactic sugar" -- it sweetens the programming style, but it is not necessary to program effectively. You can get the same effect by writing those same VIs and stringing them along on a block diagram "railroad track" style. We'll probably get around to it in three or four versions of LV -- there are some major user requests that impact functionality that have to get done first.
    PS -- in the next version of LV, wiring the LV class to the property/invoke nodes will break the wire so we'll avoid confusion in the future of people thinking there's a way to use these nodes.
    Message Edited by Aristos Queue on 04-02-2007 09:56 AM
    Message Edited by tbd on 04-03-2007 12:39 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Mathscript node access to class data

    I am trying to implement some code which I developed in Matlab in Labview. The code uses functions from the Control and Optimization toolboxes, and looks like it will port easily to Mathscript. I need to parameterize a state-space model of several drugs from several parameter (age, height,weight, gender). I can see how to create an lvclass Patient with a control which uses these four parameters in the private data. I'd like to be able to duplicate the Matlab-style syntax of Patient.Age, etc, by just wiring the Patient object to a Mathscript node.  There doesn't seem to be a way to do this without unbundling first. This seems inelegant, as it requires me to hard-code the names of the private data fields in the mathscript node interface. Is there a simple way to define lvclass data in a class VI's mathscript node?
    Matlab 2008a, Labview 8.6, MacPro OSX 10.5. 

    Hello,
    The MathScript syntactical element you are referring to is a structure.  Unfortunately, we do not have support for structures or cell arrays in MathScript at this time.  It is a limitation we are aware of and investigating for a future release.    You have discovered the workaround.  You will need to unbundle your class data and create separate variables for each member variable in the MathScript node.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • Reading data from socket problem

    Hello;
    I have implemented a multiplayer game with server java and client flash. I have a socket connection and I get(wait) an encripted data from server. However sometimes I can't get data from server. I know that server is sending the data but I can't see the data on the socket.
    Sometimes I cannot get the data in one chunk but I have solved that problem(I hope).. Here is my code:
    private function onSocketData(event:ProgressEvent = null) {
         try {
              var input:String = "";
               var  byteArray = new ByteArray();
              socket.readBytes(byteArray, 0, socket.bytesAvailable);
               input+= byteArray.toString();
              queueOrg.addToMsgQueue(input);
         } catch (error:Error) {
              trace("SocketConnector -> onSocketData : "+error);
    Thanks...

    And don't use ready() or available as a test for end of stream like that. That's not what it's for. (What is is for is a moot question.) Using it like that is a recipe for losing data.

  • "Master Data Read Class Parameters" field is disabled

    Hi.
    While creating infoobject I switch master data access from Default to Own implementation,
    after this screen is redisplayed  and only Name of Master Data Read Class field become enabled.
    I need  Master Data Read Class Parameters field, but it is disabled and button near this field has the same status.
    Why? How to make them active?

    Hi,
    I think it is not possible to add own Master Data Class if the reference is 0DATE or if the type is DATS.
    So may be you can create your infoobject as Type CHAR, Length 8.
    May be you can add a Conversion Routine for the required format of date to be displayed.

  • Are Java Classes Reliable? Big Problems Here

    Hi:
    I'm fighting with something that seems to render Java pretty much useless. There's just gotta be an explanation.
    I've got a class (oFolder) with some fields. I use that class as a node in a JTree. I'm extracting the object in the treeWillExpand event with no problem.
    In the treeWillExpand event I can access all the fields from the oFolder object. If I pass the object to another proc, that proc can only see SOME fields, and not the ones I need.
    I've tried dimensioning them as public to no avail.
    If Java isn't any more stable than this, how are you guys writing software in it?
    public void treeWillExpand(TreeExpansionEvent e)
    { //. . . get the oFolder object, fldr
    System.out.println(fldr.Folders.size()); //<<-- NO PROBLEM
    DirectoryModel.getList(fldr);
    public class DirectoryModel {
    public static void getList(oFolder fldr)
    System.out.println(fldr.Folders.size());
    // RETURNS ERROR NoSuchFieldError Folders}
    public class oFolder
    String Path;
    String Name;
    ArrayList Folders;
    ArrayList Files;
    Date LastModified;
    boolean Checked = false;
    public oFolder(File xFolder)
    Path = xFolder.getAbsolutePath();
    Name = xFolder.getName();
    LastModified = new Date(xFolder.lastModified());
    Folders = new ArrayList(50);
    Files = new ArrayList(50);
    public String toString()
    return Name;

    You are correct. I tried public for both the field and
    the class, and compiled it in it's own file. Nothing
    worked.
    Again, I put all the classes into one file and it did
    work.
    Any ideas?The ideas were already given. Again, and read this carefully this time, you are not running the correct compiled versions of one or more of those classes. Maybe you did compile all of them as you say, but did you make sure it actually did recompile them (it may not have, because the .class file may show as newer than the .java file, even though it does need recompiling because of a dependent class change - blow away the .class files first). And are you sure you aren't running some old compiled version, based on what's in your classpath?
    Bottom line: You are doing something wrong; it's not java's fault.

  • LabVIEW Class crash - ntdll.dll access violation

    Hi,
    When I close my LV11SP1f2 I always get a warning.
    It didn't bother me until a vi I wrote that uses a class with nothing out of the ordinary started crashing my LV.
    The crash says that: "DAbort 0x37C03D in MemoryManager.cpp"
    I sent the log files to the local support and they saw that the common issue between my logs is an access violation in ntdll.dll.
    Any operation that uses the property nodes of that crazy class fails, sometimes with a crash and sometimes with a error that sends me to a bundle by name in the autocreated property node.
    I rewrote the project with the class and there is no error.
    Sending the crashing project to another computer gave no error.
    Before I go on and investigate windbg to search for a conflicting app and finally formatting my entire computer could some1 help? Please...
    I attached several logs for example.
    Thanks in advance,
    GoofyWires.
    Attachments:
    92c82e7b-fa2a-43af-b2be-a6650c031681.zip ‏2485 KB
    daa462b5-9395-4e3f-8894-05a3bdb3d159.zip ‏65 KB
    ea2c40ef-056d-41ed-a4c5-9cf4bc6666fc.zip ‏494 KB

    I did a clean format and reinstalled LabVIEW 11.0.1f2 without adding many of the add-ons from VIPM and without installing the rest of my shortwave, yet, the crash is still here!
    I was able to reproduce it on my pc:
    1. I have a class that contains two children of another class which each contain another class with a class inside it.
    2. I accessed the classed through property nodes.
    3. I then went on and deleted a private data from the first class control, deleted its property nodes and added a new private data to that class control and added the property nodes for it.
    4. I updated the vi that used the classes to stop using the deprecated property node and start working with the new one.
    5. I did a "save all" and run the vi. All OK!
    6. I closed LabVIEW and reopened the project and run the vi which is not broken! LabVIEW crashes!!!
    I guess the complexity of the class is not the issue and it can be reproduced in a much simpler way.
    Yet, since I bet the scenario caused you to raise an eye brow I'll give an example as an analogy:
    File Handler class contains ASCII Read class and ASCII Write class which inherit from class ASCII.
    Class ASCII parent contains class Headers while class Header contains class Data.
    Thus, class ASCII Handler will use class ASCII Read/Write to give a high level simple interface while during the read/write the inner ASCII Read, for example, will add to the Header class in it the read data which will in turn be added to the array in the private data of class Data.
    I'll try and reproduce it on a different pc and send the local NI support the code and way to reproduce.
    I see two possibilities:
    1. Something is wrong with my new Dell PC.
    2. LabVIEW doesn't handle and propagate correctly changes in a class to all the vis that use it. Maybe changing the array size in a class overrides some memory since the class can't change its size.
    Please let me know if this rings a bell.
    Update: I coundn't reproduce the crash on my pc with a simpler case. There is something missing...
    I'll try to replroduce with the complex class on a different pc and if it crashes I'll simply send my original code.

  • Data Reconciliation Node on SAP Source System

    Hi Gurus,
    I'm working on Data Reconciliation between SAP BI and SAP R3 systems.  I've read on the forum that the reconciliation DataSource technology is available as of PI-BASIS 2005.1 / SAP NetWeaver 2004s.  I'm using
    SW Comp     Release             Level     Highest Support     Desc
    PI_BASIS      2005_1_640      0017      SAPKIPYJ6H         Basis Plug-In (PI_BASIS) 2005_1_640
    I wonder that I cannot see the Data Reconciliation Node in the transaction RSA6 in the SAP Source System.  Please throw some light on this whether I need to activate them.
    Thanks & Regards,
    Ash.

    Hi Sunny,
    Thanks for your response.  Can you suggest me what should I do to get those DataSources?  Are there any patches that SAP has released to overcome this problem for lower versions as the one which I'm using?
    Thanks,
    Ash.

  • ITunes 10.5.3, Unable to Load Class Data from Sync Services, Crashes Repeatedly

    Ever since iTunes 10.5.3 on my Windows 7 x64 box, I've been having serious problems keeping iTunes running:
    1)  Any time I connect my iPhone or iPad, or any time they attempt to sync over WiFi, I get the 'Unable to load class data from sync services' error.  It's worth mention that the iPhone or iPad do actually then proceed to sync correctly, and all media / data is synchronized successfully, as far as I've been able to tell.  I've reset sync history, restored the iPhone and iPad, manually moved the SyncServices directory, set both the iPhone and iPad up as new, completely uninstalled iTunes and the mobile device software, re-installed, and *nothing* I do fixes this issue or even seems to impact it.  Uninstalling iTunes 10.5.3 and reinstalling iTunes 10.5.2 resolves this error.
    2)  iTunes 10.5.3 has serious crashing problems on my machine, though I've searched through forums and found a lot of other people with the problem.  In my case, sporadically as iTunes access the iTunes store (for example, I can always make it happen by subscribing to the Diggnation podcast and telling it to refresh the podcast), I get a full application crash which generates the following event in the event log:
    Faulting application name: iTunes.exe, version: 10.5.3.3, time stamp: 0x4f14cc3d
    Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e211319
    Exception code: 0x80000003
    Fault offset: 0x0001280c
    Faulting process id: 0x564
    Faulting application start time: 0x01cce78789dc009a
    Faulting application path: D:\Program Files (x86)\iTunes\iTunes.exe
    Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
    Report Id: ecc77400-537a-11e1-b809-00248c196007
    Again, uninstalling iTunes 10.5.3 and re-installing iTunes 10.5.2 fixes this issue as well, but I really shouldn't have to do that.  Is there any actual solution to these problems other than dowgrading to an older version?
    Yes, I'm running current malware protection (and my system is clean) and yes, I've already checked any other obvious culprits to make sure I don't just have a corrupt library or file somewhere that's causing it.  My Windows 7 install is completely up to date from a Windows Update perspective and also from a driver perspective (even including the motherboard and chipset drivers).  I made sure to do a system file integrity check (sfc /scannow) and it confirmed my install of Windows isn't suspect, but beyond all that I was able to reproduce these failures on a completely separate machine running Windows 7 x64, without any of my media library or data on it -- iTunes 10.5.3 just seems to be bad news on Windows 7 x64 for me, even though I know there are definitely people are using it successfully.  I don't get any other application crashes for any other applications, and I've never had an issue like this with any previous version of iTunes...
    Last but not least, in case it matters, I'm running iOS 5.0.1 on both the iPhone4 and the iPad2.  The iPhone4 is the GSM AT&T model and the iPad2 is the CDMA Verizon model.

    OK, I've given up.  Uninstalled iTunes 10.5.3 permanently.  It's a shame, 10.5.2 works perfectly but 10.5.3 is a complete and total cluster for me.
    Anyone with the same problems who hasn't done this already, just uninstall iTunes and the Apple Mobile Device Service in your Add/Remove Programs, then re-install iTunes 10.5.2.  You won't lose your library or any settings or apps, it will just go back to working again.
    I wish Apple would acknowledge this so that I'd at least know it would be fixed in the future.

  • Cannot reslove symbol class Date

    I am trying to get a clock to show the time in my program. However, when I try to compile the program a "cannot resolve symbol class Date" error appears. I can't figure out where the problem in my program is. Here is my source code. I would appreciate any help.
    import javax.swing.*;
    import java.io.*;
    import java.lang.*;
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    //import java.util.*;
    import java.math.*;
    public class store
    public static void main(String[] args)
    String dataInput;
         dataInput = JOptionPane.showInputDialog(null, "Input item data: ");
    JOptionPane.showMessageDialog(null, "" + dataInput);
    EasyReader console = new EasyReader();
    int i, j, k, inum, icom, min, nswaps; inum = 0; boolean swap = false;
    double num[] = new double[100]; double dsum, T;
         do
         System.out.println(); System.out.println("Command Menu"); System.out.println();
         System.out.println("1 = Display the data");
    System.out.println("2 = Bubble Sort the numbers");
    System.out.println("3 = Selection Sort the numbers");
    System.out.println("4 = Insertion Sort the numbers");
    System.out.println("5 = Binary Search for a number");
    System.out.println("0 = Exit the program"); System.out.println();
    System.out.print("Enter Command - ");
    icom = console.readInt(); System.out.println();
    switch (icom)
    case 1: // Display the data
                   Display(inum, num);
                   break;
    case 2: // Bubble sort
                   nswaps = 0;
                   for (i = 0; i < (inum-1); i++ )
              for (j = (i+1); j < inum; j++)
                        if (num[i] > num[j])
                                  T = num;
                             num[i] = num[j];
                             num[j] = T;
                             nswaps++;
                   System.out.println("The number of swaps was - " + nswaps);
                   Display(inum, num);
                   break;
    case 3: // Selection sort
                   nswaps = 0;
                   for (i = 0; i < inum - 1; i++) {
              min = i; swap = false;
    for (j = i + 1; j < inum; j++)
         if (num[j] < num[min]) { min = j; swap = true; }
    if (swap) {T = num[min];
              num[min] = num[i];
                        num[i] = T;
                        nswaps++;}
                   System.out.println("The number of swaps was - " + nswaps);
                   Display(inum, num);
                   break;          
    case 4: // Selection sort
                   nswaps = 0;
                   for (i = 1; i < inum; i++)
                   j = i; T = num[i];
                        while ((j > 0) && (T < num[j-1]))
              num[j] = num[j-1]; j--; nswaps++;
                   num[j] = T; nswaps++;
                   System.out.println("The number of swaps was - " + nswaps);
                   Display(inum, num);
                   break;
    case 5: // Binary Search
                   System.out.println("Your numbers will be sorted first");
                   System.out.println();
                   for (i = 1; i < inum; i++)
                   j = i; T = num[i];
                        while ((j > 0) && (T < num[j-1]))
              num[j] = num[j-1]; j--;
                   num[j] = T;
                   System.out.print("Enter the number to locate - ");
                   T = console.readDouble(); nswaps = 0; System.out.println();
                   int left = 0, right = inum, middle; k = -1;
                   while (left <= right)
                        middle = (left + right) / 2;
                        if (T > num[middle]) {left = middle + 1; nswaps++;}
                        else if (T < num[middle]) {right = middle - 1; nswaps++;}
                        else { k = middle; break; }
                   if (k == -1) System.out.println("Your number was not located in the array");
                   else System.out.println("Your number " + T + " is in position " + (k+1));
                   System.out.println();
                   System.out.println(nswaps + " comparisons were needed to search for your number");     
                   Display(inum, num);
                   break;
         } while (icom != 0);
         public static void Display(int inum, double num[])
              {     int k;
                   System.out.println();
                   System.out.println("");
                   System.out.println();
              for (k = 0; k < inum; k++)
              System.out.println((k+1) + " - " + num[k]);
         return;
    class Clock extends Thread
         //A Canvas that will display the current time on the calculator
         Canvas Time;
         //A Date object that will access the current time
         private Date now;
         //A string to hold the current time
         private String currentTime;
         //The constructor for Clock, accepting a Label as an argument
         public Clock(Canvas _Time)
              Time = Time;          //Time is passed by reference, so Time
                                       //now refers to the same Canvas
              start();               //start this thread
         //The overriden run method of this thread
         public void run()
              //while this thread exists
              while (true)
                   try
                        draw_clock();          //calls the draw_clock method
                        sleep(1000);          //puts this thread to sleep for one
                                                 //second
                   //catches an InterruptedException that the sleep() method might throw
                   catch (InterruptedException e) { suspend(); }
                   //catches a NullPointerException and suspends the thread if one occurs
                   catch (NullPointerException e) { suspend(); }
         //A method to draw the current time onto the Time Canvas on the applet
         public void draw_clock()
              try
                   //Obtains the Graphics object from the Canvas Time so that it can
                   //be manipulated directly
                   Graphics g = Time.getGraphics();
                   g.setColor(Color.gray);          //sets the color of the Graphics object
                                                      //to gray for the rectangle background
                   g.fillRect(0,0,165,25);          //fills the Canvas area with a rectangle
                                                      //starting at 0,0 coordinates of the Canvas
                                                      //and extending to the length and width
                   g.setColor(Color.orange);     //sets the color of the Graphics object
                                                      //to orange for the text color
                   get_the_time();                    //calls the get_the_time() method
                   //calls the drawString method of the Graphics object g, which will
                   //draw a string to the screen
                   //Accepts a string and two integers to represent the coordinates
                   g.drawString("Current Time - " + currentTime, 0, 17);          
              //catches a NullPointerException and suspends the thread if one occurs
              catch (NullPointerException e) { suspend(); }
         //A method to obtain the current time, accurate to the second
         public void get_the_time()
              //creates a new Date object for "now" every time this is called
              now = new Date( );
              //integers to hold the hours, minutes and seconds of the current time
              int a = now.getHours();
              int b = now.getMinutes();
              int c = now.getSeconds();
              if (a == 0) a = 12;          //if hours are zero, set them to twelve
              if (a > 12) a = a -12;     //if hours are greater than twelve, make a      
                                            //conversion to civilian time, as opposed to
                                            //24-hour time
              if ( a < 10)               //if hours are less than 10
                   //sets the currentTime string to 0, appends a's value and a
                   //colon
                   currentTime = "0" + a + ":" ;
              else
                   //otherwise set currentTime string to "a", append a colon
                   currentTime = a +":";               
              if (b < 10)                    //if minutes are less than ten
                   //append a zero to string currentTime, then append "b" and a colon
                   currentTime = currentTime + "0" + b + ":" ;
              else
                   //otherwise append "b" and a colon to currentTime string
                   currentTime = currentTime + b + ":" ;
              if (c < 10)                    //if seconds are less than ten
                   //append a zero to string currentTime, then append "c" and a colon
                   currentTime = currentTime + "0" + c ;
              else     
                   //otherwise append "c" to currentTime string
                   currentTime = currentTime + c;
    }          //end of the Clock class

    Wow.
    1) Please in future use the code tags to format code you post so that it doesn't think you have italics in your code and render it largely1 unreadable. Read this
    http://forum.java.sun.com/help.jspa?sec=formatting
    2) You commented out the import of java.util which is the problem you are complaining about.
    3) Are you planning to stick all the code you ever write into the one source file? Why is all this stuff rammed together. Yoinks.

  • Bug?: Using waveform prims to unbundle class data

    I discovered this the other day and figure it's not something that NI intentionally permits.  Feel free to correct me if this is expected behavior.
    Attaching a class wire to a Get Waveform Components prim allows you to unbundle the class data.  This works on IPE waveform border nodes too.
    (Cross posted to Lava.)

    I discovered this the other day and figure it's not something that NI intentionally permits.  Feel free to correct me if this is expected behavior.
    Attaching a class wire to a Get Waveform Components prim allows you to unbundle the class data.  This works on IPE waveform border nodes too.
    (Cross posted to Lava.)

  • Save Labview Class to file?

    Hi there,
    I am playing around with the new Labview classes and i am thinking working with classes is pretty cool.
    But i am not able to save the objekt to a binary file load them and use this data to initialize the Object with this data.
    Its no problem write the state of Class to a binary file oder flatten the state to XML.
    But i got a lot of troubles load them back.

    I changed the example so that it works.
    Please have a look.
    Attachments:
    saveclassdata.zip ‏37 KB

  • Attempting to understand object/class data and the actor framework...

    I'm currently trying to understand why changing a typedef within class data of a class (named measurement.lvclass) causes all of the "launch nested actor" vi's to break.  I feel like I'm trying to use a ratchet with a phillips screw or something, is there something I'm fundamentally missing here? 
    I was under the impression that you can populate class data clusters with information that might require read/write in different methods (the vis in the measurement class called by the do.vi of that particular msg class... we still call them methods right?).
    thx

    Thanks for the tips, theyre appreciated, 
    I think I can chalk this one up to a lack of communication with another developer on the project...  We actually found a realy interesting issue involving a type def input on a subvi where any updating of it causes labview to crash when you attempt to save that subvi. if I get time I want to try to isolate it and maybe post it up here for a closer look under more experienced eyes...  due to being under pressure, we had to disconnect form the type def and basically update it manually which is a PITA but got the system running...
    thanks again
    -pat

  • CustomNode not recognized as its class type but as class javafx.scene.Node

    In the following code...
    Stage {
        title: "Circles"
        scene: Scene {
            width: 200
            height: 100
            content: Box {}
    class Circle1 extends CustomNode {
        public var Name: String = "Circle1";
        public var Radius: Integer = 50;
        override function create(): Node {
            return Group {
                        content: Circle {
                            radius: Radius;
                            fill: Color.rgb(50, 50, 50)
    class Box extends CustomNode {
        public var Name: String = "Box1";
        var c1: Circle1 = Circle1 {Name: "c1"};
        var c2: Circle1 = Circle1 {Name: "c2"};
        var c_all = [c1, c2];
        def hbox = HBox {content: c_all};
        override function create(): Node {
            return Group {
                        content: hbox
        public function ChangeRadius(p_value: Integer): Void {
            for (i in [0..sizeof hbox.content - 1]) {
                //hbox.content.Radius = p_value; // ERROR: cannot find symbol - symbol: variable Radius - location: class javafx.scene.Node
    println("{hbox.content[i]}");
    var box: Box = new Box;
    box.ChangeRadius(120);
    ... I get an error (see code comment).
    I think actually should it be not class "javafx.scene.Node" but "Circle1"?
    The println writes the correct types.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    It is indeed a bit perplexing... At runtime, we get Circle1, so it should work.
    I think the problem is that the 'content' variable of HBox is defined as Node[] and that's all the compiler sees.
    So the solution is to cast the object we get to tell the compiler it is a specialized node. If the node isn't of the right type, we will get a runtime error instead...
        public function ChangeRadius(p_value: Integer): Void {
            for (c in hbox.content) {
                // Checking type...
                if (c instanceof Node)
                    println("Node");
                if (c instanceof CustomNode)
                    println("CustomNode");
                if (c instanceof Circle1)
                    println("Circle1");
                if (c instanceof Circle)
                    println("Circle");
                if (c instanceof Group)
                    println("Group");
                println("");
                (c as Circle1).Radius = p_value;
    //~             println("{c.Name}");
        }

Maybe you are looking for