A problem about property node

Hi,
    Why this VI use property node before visa read?
Attachments:
Basic Serial Write and Read1.vi ‏36 KB

Hi hengfo,
      It's not necessary to use "bytes at port", in fact, I don't trust it, it seems there can be some strange latency! (see threads below)
Just go ahead and wire the number of bytes you want to read to the Read  - but be ready for a timeout error if the bytes you request don't arrive within the VISA timeout period.
See these threads:
http://forums.ni.com/ni/board/message?board.id=140​&message.id=7839&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=170​&message.id=111079&requireLogin=False
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

Similar Messages

  • Knowledge about Property node

    I want to connect the acquired data to a database for the future operation (MS ACCESS, or others except MS EXCELL). Different steps involved in that acquistion
    How can I connect my acquired data using activex controls .I want to know more about the Property nodes different properties in some what detail How can i get it from /
    With regards
    Rathesh K  

    THe DB toolkit mentioned by Doc is worth evaluating for your use.
    To answer your direct question:
    The help for MS stuff is not loaded by default when you install their products.
    I have done a costum install of MS Office and made sure the "Help for VBA" is included in the install.
    This will let you get help on using the MS ActiveX functionality. The examples they show will be VBA examples but will map to equivalent LV operations in most cases.
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • I met problems about XML Node attributes in Flex 2.0

    Here is my example
    <Root Pro1="1">
    <TestNode />
    </Root>
    I get the XML from HTTPService:
    var xmlData:XML = new XML(hsTest.lastResult);
    I can get the value by the method "attribute()":
    xmlData.attribute("Pro1"); // correct
    But if i try the code:
    xmlData.attribute("Pro2"); // Not null,and even not "", but i
    really do not know what it is.It just shows blank in "Alert.show()"
    method.
    In the fact, i want to check whether the XML Node has a
    certain property.Finally i find the method "hasOwnProperty()", but
    it does not seem to work like its name:
    xmlData.hasOwnProperty("Pro1"); // return false
    xmlData.hasOwnProperty("Pro2"); // return fasle
    I wonder how i should code it.
    Thanks in advance.

    If you look at the return value of the attribute() method,
    it's an XMLList. You can think of it as an array of XML objects. In
    this case, it returned an empty XMLList. Just check whether
    length() is 0 is not.

  • Y scale flip in waveform graph when using property node.

    I'm having problem with property node. I'm trying to build a stackable scope with Waveform Graph And dynamically change the number of plots. It is working. But The Y scale is flipping. The minimum goes on the upper part and the minimum scale goes down. when I change it appearance it's not very fast. It take about 1 or 2 second on my computer.
    The way it is build actually is:
    Cluster_1 is containing 8 clusters. And each of the 8 clusters are containing a Waveform Graph. By reference I change the property of each Waveform to make visible or not each of the Waveforms.
    First I would like to solve the scale problem and second accelerate the redrawing of my scope.
    Maybe there is an other way t
    o do what I need.
    Thanks.
    Nitrof
    Attachments:
    MultiScopeExample.llb ‏192 KB

    Wow, you have a neat program! The problem with your y axis flipping is because the last four charts in the cluster were programmed with a flipped axis. I relabeled the charts and it worked correctly.
    From what I could tell with your code, you do not need the sequence structures. The one inside of the even actually runs the same code twice. Remove this duplication and you should see improvement. Also clusters are slow, so you should not expect it to blink back with additional coding. Use defer panel updates to get that behavior. I incorporated these changes and attached the program.
    Jeremy Braden
    National Instruments
    Attachments:
    MultiScopeExample.vi ‏163 KB

  • Problem about selecting waveform in waveform graph

    Hi all:
    I am developing a project by Labview. Now I meet a problem about selecting the waveform in the waveform graph.
    I am not sure whether it is possible about my idea.
    for example:
    In the waveform graph,  the different waveforms from a couple of channels are displayed. and then I want to select one waveform of them, and corresponding data about this waveform are shown. 
    Thanks so lot
    regards

    hanwei wrote:
    1.  can I zoom in and out in that "waveform graph"??
    You can do this using the graph palette. Just make it visible. The middle control allows you to zoom.
    2.  can I display the plot array or plot index that I select in the waveform graph?
    You can connect the same wire that goes to the ActivePlot property node to an indicator.
    3.  I build a sample codes for my project, in which , I used a random number generater to simulate a DAQmx data collection, and generate a overlapping waveform in the waveform graph.
         but it seems the program is not stable, when i first run the codes, it is ok, and I can select the plot what I want. but after I stop and restart the program, there is error message about "Property Node".
         it seems something wrong about the "waveform graph properties"
    I attached my codes here, anybody know what wrong about it?
    For some strange reason the property node is "messed up". I've seen this happen sometimes with graphs. I don't know what causes it, and the only way I've found to fix the problem is to delete the graph, put a new one on the front panel, and recreate the property nodes. I've typically seen this happen when copying code from another VI that has a graph with property nodes, as I suspect you did. If you delete the graph, put a new one on there, and recreate the property node you should be OK.
    That said, a few comments regarding the code:
    The architecture seems to be a mish-mash of operations, and I'm thinking that you probably want to look at using a producer-consumer architecture. Your producer loop responds to events, and the consumer loop does your DAQ collection.
    You have a race condition with your use of the "size(s) 2" local variable.
    Avoid right-to-left wires.
    The method of creating your arrays seems convoluted. However, since you said you will actually be getting the data from a DAQ system, the actual project code will likely be considerably different.

  • How to use Property nodes?

    Hi everyone,
                           I am a beginner of LabVIEW. So I want to know about Property Node in detail. Please Please someone help me know the function of each property node......
    Thank You in Advance,
    Solved!
    Go to Solution.

    Achuthaperumal wrote:
    I am a beginner of LabVIEW. So I want to know about Property Node in detail.
    Property node allows you to programmatically read/write that particular property of associated object. For example, say you have a String Control, and you want to modify its 'Display Style'... for that you need to create and use that particular property node (of the String control).
    Check the attached example.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Example - Using Property Node [LV 2009].vi ‏11 KB

  • Invoke, property nodes

    Could someone please direct me to some reading material about Property nodes and Invoke nodes? I need a basic explanation of what where how and why! Thanks,
    Ivanka

    Property nodes and invoke nodes let you access the more specific properties and methods of a control.
    An easy way to think if this is properties nodes let you manipulate characteristics of a control like color, labels, and etc. and the actual properties change based control. Invoke nodes let you access possible actions of a specific control.
    Due to the fact that properties and methods change based on the control, to do further research on the specifics on what is possible using these nodes, you must do control specific research which will discuss this specifically.
    If there is something more I could clear up for you please let me know! Have a great day!
    Allan S.
    Applications Engineering
    National Instruments

  • Problem scrolling using property nodes

    What Im trying to do is a "fake scroll bar" using numeric controls and the VI Property FP Origin for the same vi where the numeric controls are. The problem is that when the vi is running and I use the scroll bar the controls also move and is a mess. I need to have it in a fixed (like floating) position within the window, how can I do that?

    How about using a property node to move the control as you scroll so it
    appears to remain fixed on a moving front panel?
    "pacp" wrote in message
    news:50650000000500000082D90100-1079395200000@exch​ange.ni.com...
    > Hi,
    >
    > What I want to move is the entire front panel but one control (the
    > fake scroll bar which is a numeric control) that is on it. What I
    > really need is to have ONLY a vertical scroll bar... the way to do it
    > doesn't really matter,
    >
    > Thanks

  • Problem with the Value property node (MacOS)

    As far as I have tested it, Value Property nodes (and Value (signaling)) don't work in MacOS : The value property appears as a boolean, the value(signaling) as a cluster (width, height).
    Even with boolean controls, the node is not working.
    No such problem in LV 8.6.
    Am-I missing something ? Is that some "intended use"  ? Or simply a bug ?
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Solved!
    Go to Solution.

    That sounds like some sort of indexing problem with the property nodes like somesort of corrupted installation.  What if you just delete the property node and recreate it?
    I dropped a numeric control and looked at the shortcut menu for the list of property nodes.  Right below Value and Value (signalling) are Visible (which would be a boolean) and Xcontrol, which when you step down through the submenus, the first choice is Container bounds, a cluster of Width and Height.  So these 2 datatypes that are 2 lower on the list match the ones you are getting.
    What happens if you pick another property node a few elements up or down on the shortcut menu?  Does is happen for some other properties, and if so, are thereany properties that are okay?
    Here is what my property nodes look like for a numeric and I draggged the box up and down to show the natural order of the property nodes.  Note that I have scripting installed, so there are a few more property nodes (and the blue box at the top) that you might not have.
    PS.  Check you signature.  The Kudos button is now moved to the left since the forum upgrade. 
    Attachments:
    Example_VI_BD.png ‏4 KB

  • Any alternate solution to using Waveform Chart Property Nodes 'ActPlot', 'Plot.Visible' for mulit-plot color problem on PDA?

    Hello,
        On a waveform chart, 4 signals need to be plotted based on the status of 4 boolean inputs. Eg. if the first boolean input is true, the first signal needs
    to be visible on the waveform chart; if the first boolean input is false, the first signal should not be visible on the waveform chart and so on. This can be
    done on LabVIEW desktop using the Waveform Chart Property Nodes 'ActPlot', 'Plot.Visible' - a sample VI "BundleSignals_Select_Desktop.vi" is attached for
    reference.
        But on PDA, since the Waveform Chart Property Nodes 'ActPlot', 'Plot.Visible' are not supported, some other method has to be used. I have done the
    selection/de-selection of these signals using 'Insert', 'Delete' array functions as shown in the attached VIs "BundleSignals_PDA.zip" which works, but the
    problem is that the colour of these signals do not work as desired when the selection/de-selection of these signals is done - It is required that the first
    signal should always appear in White color, the second signal should always appear in Red color, the third always in Green color & the fourth always in Blue
    color.
        I hope i have made myself clear of the problem. Has anyone faced this problem before & is there a solution?
    Note: Version of LabVIEW that we are using: LabVIEW 8.5 Professional Development System for Windows Vista/XP/2000 and LabVIEW 8.5 PDA Module for Windows
    Mobile.
    Thanks & Regards,
    Subhashini
    Attachments:
    BundleSignals_Select_Desktop1.vi ‏25 KB
    BundleSignals_PDA.zip ‏26 KB

    Unfortunately the only alternative to using property nodes is to set the properties manually on the development environement. The limited size of memory does limit us in terms of features for the module.
    Mehak D.

  • Problem in writing to a property node of a cluster

    Hello together!
    I have a problem in writing to a property node of a cluster which contains several control elements, such as combo boxes or string controls.
    I would like to set the options to choose for an array of such clusters.
    I tried to do this by writing to property node --> value, but the the control element in the cluster does not remain a control, but instead an indicator. The can't choose one of
    the options that I set. So I further set the property node --> indicator (of the cluster) to "False", with the purpose to keep the control as a control. This results in a comment from Labview,
    that this is not possible as long as the Vi is not in edit mode. I don't understand this comment. If I look to Labviews toolbar "Operate", I see that I am obviously in edit mode.
    If anybody could help me, or suggest a better solution to solve my problem I would be very glad.
    Thanks a lot!
    Woodi
    An example of what I tried to do:
    Attachments:
    How to write to a cluster.vi ‏42 KB

    I took the liberty to modify your VI for an alternative approach (LabVIEW 7.1). You should keep your array of 32 clusters in a shift register and show only a single cluster as a front panel control.
    Selecting a different transducer from the listbox on the left will load its settings into that control via a local variable.
    Any changes to the settings will modify the currently selected array element
    At any give time, a boolean array shows which transducers have changed settings
    At any given time, a listbox summarizes all settings.
    Let me know it this makes sense to you. These are just some ideas, modify as needed. Good luck!
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    How_to_write_to_a_clusterMOD.vi ‏87 KB

  • I'am having problem with a graph property node by using format & precision

    I would like to display an amount of data in a waveform graph and to choose the X scale to display absolute time (whitout date information) or scaled decimal value.
    Absolute time is a must because the scaling should reflect the acquisition time and not only a value in hour, minute and second.
    Using the property node I can choose between 10 differents formats (0-Decimal, 1-Scientific, 2-Engineering, 3-Binary, 4-Octal, 5-Hexadecimal, 6-Relative Time, 7-Time and Date, 8-SI, and 9-Custom).
    Format 7 - Time and Date should be a good choice but LabVIEW set automatically system time AND system date without any possibilities to change anything.
    Trying format 9 - Custom ends everytime with error 1077 (invalid property value).
    Any help to explain me how to use the format Custom or to give me a solution to switch between time (no date) and decimal scaling is appreciate.
    Thank 

    In addition to the Xscale.Format property node, you also need to set the XScale.FormatString (see a little below the Format entry).
    Use %<%.0X>T as format string.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Question(s​) about the Active Cell:Posit​ion property node for a table control

    Hello,
       What determines the Active Cell Position property node for a table control? I have this in my code and I am displaying its value to a front panel indicator. The value displayed is always set to 0,0. The help for the property node say that it is "read -only" so what sets the value of Active Cell Position  for a Table Control?
    Regards,
    Kaspar
    Solved!
    Go to Solution.

    You set the active cell with a property node.  Once you select an active cell, you can do specific things to that cell and that cell alone, things like set the background color.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Help me , there is a problem about xcontrol's property and method vi!

    Hi everyone,
    we know xcontrol's property or method is a vi actually when we create them.
    we are also sure there are two ways(static and dynamic way) for invoking a vi at least.
    So when we evaluate xcontrol by property node or execute method through method node, does labview dynamically invoke the property or method vi ?  if labview dynamically invokes them,does owner vi wait them done or not?  

    What you could do is create a pumping scheme, that pumps the data into the Facade VI and handle the number crunching there, however that would block the execution of events in the facade VI.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Disabled property node hangs loop

    I've got a parser loop, operating on streamed data from a CRIO via UDP.  The loop operates at about 90Hz.  In response to the user opening a file, the code will use a property node to enable (or disable and gray) a couple of boolean front-panel objects.  When these property nodes execute, I see the CPU usage (in Windows task manager) go to close to 100% and coincidentally, the parser loop hangs.  Other loops within the same VI continue to run.  CPU usage stays at 100% until I force a VI abort.
    With a small test-VI, I've noted that these property nodes require roughly 10ms to execute.  This seems quite sluggish, but nonetheless, my thoughts are that my code, running at 90Hz, would be able to tolerate a single slip of the loop execution time, particularly because the UDP data is queued.
    Any thoughts regarding this property node execution time or suggestions on how to improve the code?  Thanks in advance.

    Mark, thank you for offering to look at a stripped-down version of the code.  I just couldn't spare the time required to simplify our complex code.  However, I've been working on this problem in the past couple of weeks since I originally posted the question, and have made some progress toward a solution.  Although I still do not have a conclusive explanation for the Labview's behavior, I thought I'd follow up with a list of what appears to have made improvements to the code.  I'll concede that these suggestions are not definitive, but the problems are not repeatable and without any transparency into Labview's internal behavior, my analysis of the problems and my attempts to find a fix are admittedly speculative in nature.  Software development shouldn't be magic, but damn it seems like Labview requires we dance around a black candle.  Frustrating.  OK, exiting rant mode, here is a list of what NOT to do if you want Labview to be more stable:
    --  Do not use frames around your front panel objects.  Our main panel has approximately 100 front-panel indicators.  In an attempt to make the interface more intuitive, in a recent code revision we grouped the objects using frames.  The effect was a sluggish UI and a processor loading that went to close to 85%.  I'm aware from posts on this forum that overlapping indicators forces Labview to update all when any is updated.  This is an understandable coding contraint.  OK, fine, we weren't overlapping any idicators.  But for pete's sake, why should the same constraint apply to a purely decorative object like a frame?  This strikes me as a fundamental philosophical flaw in LV's coding.  Group N objects with a nice frame -- update the objects N-squared times.  If this is the result of using a frame, I would have preferred that NI not even offer the option.  Bad choice on the part of the Labview coders and bad choice on our part for assuming zero frame impact on performance.
    -- Do not use property nodes.  We occasionally gray-out front panel objects when appropriate for the state of the software.  This appeared to be contributing to Labview's instability.  I built a diagnostic routine that measures execution time for the "gray-out and disable" property node.  Generally around 8ms, but occasionally as high as 16ms.  Good grief.  I've got a code loop running at 90Hz.  A 16ms hit isn't easy to tolerate or frankly to understand.  Particularly when slow execution is the BEST of the consequences -- the worst is that the property node seemed on occasion to precipitate a hung loop.
    -- Do not use Labview's built-in queue structure.  Our code was originally using queues to hand off packets of data from a UDP-listener loop to a packet-parser.  The UDP-listener blocks on UDP reception, shoves the packets into the queue.  The packet parser blocks on data available in the queue and subsequently writes the data to file.  NI would have you believe, and I did believe for a while, that this is an elegant producer/consumer approach to this problem.  When our problem would occur, the UDP-listener continued to put data into the queue, but the packet parser would never retrieve it.  Just went off into nowhere, consumed and forgotten by the Great Labview Scheduler in the Sky.  The loop would hang, wouldn't respond to the stop button, would require a forced-abort.  Subsequently, if we simply restarted the code, we couldn't be assured that the packets retrieved from the queue would be in chronological order.  Seemed to be just randomly retrieved.  Clearly the failures had corrupted some of the Labview internal data structures that govern the queue operation.  We couldn't assure proper behavior unless we shut down and restarted Labview each time the error occurred.  The solution was to abandon code elegance in favor of sequential operation -- get rid of the queue, listen for the UDP packet then parse it immediately.  No queue handoff.  No further parser lock-ups.
    I'm not sure what other bombs might be lurking in our code.  Our listener and parser code hasn't lately hung, but the problem is starting to move on to other loops.  They'll run for hours and then just stop.  Dead.  Frozen.  In the most recent cases, even the abort button won't shut them down.  We have to use Windows Task Manager to kill them.  I'll admit to harboring some deepening skepticism for any of the more clever and powerful "features" that NI has added to LV.  From my perspective, these more powerful features cannot come free of cost -- they must impose some unavoidable computational burden on LV itself, a burden that LV seems unable to handle, with unpleasant consequences.  Must we impose a moratorium on Timed Loops?  Event structures?  To what level of simplicity must I drive our code to ensure stability?
    Thanks, everyone, for tolerating my frustration, and for your comments, if you've got any guidance you can offer.
    -dave sprinkle

Maybe you are looking for