Picture Indicator slows down front panel

Hello folks,
I would like to use the picture functions vi's to draw alot of dots on a bitmap.
Problem is, that after a certain amount of dots (>10k) the vi starts to slow down if I show the indicator of the picture.
However when I use a picture to pixmap and then redraw the picture from the pixmap the front panel indicator doesn't slow down the vi at all.
I would be very grateful for a more elegant solution to this problem other than redrawing the picture from a pixmap.
Best regards,
Mark
Attachments:
DotDrawing.vi ‏12 KB

Mark,
When the image has more datapoints than the image has pixels or when the new image overlaps part of the old image, things can slow down.
But I suspect that the real problem is the re-allocation of memory as the picture string grows.  Open the Draw Point.vi and Set Pen State.vi block diagrams and you will see that each of them does a Concatenate String operation.  Strings are stored in memory as a 4-byte length and an array of characters. Like any other array, the string elements must be in contiguous memory locations. So, as the string grows, frequent memory re-allocations must occur.  This can slow things dramatically.  The way those picture VIs are built there is no way to effectively pre-allocate the memory.
I do not know how effective it might be, but you could rewrite those VIs to use arrays of U8, Initialize Array, and Replace Array Subset, followed by Byte Array to String.  Then only one memory allocation wold be required.
Lynn

Similar Messages

  • Print only a specific control or indicator on a front panel to HTML document

    Is there any way to print a specific control or indicator (not the whole front panel) to HTML document? I am trying to print a report that has a graph and some indicator value on it.

    There is a VI called "Append Control Image to Report.vi" which will allow you to do this. It's located in the Functions>>Report Generation pallette. Take a look at this and see if it's what you're looking for.
    J.R. Allen

  • Saving text written in a string indicator on the front panel

    Hi,
    As a new LabVIEW user I'm trying to type a manual to explain how to use the software program I'm writing. I would like to display it on the front panel in one of the tab windows. There is quite a lot of writing and I would like the user to be able to scroll through the text. I tried inserting a string indicator, right clicking on it and selecting 'visible items'>>'scrollbar'. However, when I saved my changes the writing in the indicator was not saved with the rest of the changes. I'd be grateful for any advice.
    Thanks,
    Adrian
    [email protected]

    Adrian,
    The 'data' in your string indicator was probably not saved as 'default', so that when you closed the VI and re-ran it, it was lost.
    For any data (strings, numbers, etc.) that you want to have as default, you will need to rt-click the indicator/control and under data operations, select 'make current value default' (when you have the data entered).
    Also - add an Invoke node function to force this indicator to display the default data upon initial running of the VI.
    Another way, though, when you have a 'lot' of text, is simply save your info in a text file, and have a VI open the file and display it either as the text file itself, or as input into a string indicator.
    Good Luck, Doug

  • Loading images on front panel

    I am trying to load an image in my vi's front
    panel while I am running my vi because I want to
    choose the image to display.
    I just found out that Labview doesn't have any
    function for that, not even the picture menu.
    I don't want to paste all the images on the front
    panel, because they are big and will decrease my
    vi performance.
    I've been looking for an active X control to do
    it, but I haven't found one yet.
    I also tried the picture ring in the control
    menu, but my vi size gets really big.
    Any one has any suggestions about active X or a
    different aproach ????
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    wrote in message
    news:8q64he$j3u$[email protected]..
    > I also tried the picture ring in the control
    > menu, but my vi size gets really big.
    > Any one has any suggestions about active X or a
    > different aproach ????
    Use the picture indicator? Put a big picture indicator on the front panel,
    with (perhaps transparent) controls and indicators in front of it if that's
    what you want, and load your images as needed from JPEG, PNG or BMP files?
    Perhaps loading them all at runtime to avoid the delay when displaying an
    image. I've never used them for loading picture files, but there's a
    comprehensive set of utilities in vi.lib/picture that should do what you
    want.

  • How to create a picture indicator from an array of 32-bit integers

    My problem is simple. I have an array of signed 32-bit integers that represents image information. I want to display that information in a picture indicator on the front panel of my VI, but none of the picture indicators accept the array. What conversions or picture control do I need to use?
    thanks!

    Try Draw Unflattened Pixmap.vi.
    Lynn

  • Placing indicator on front panel in front of control

    I would like to put a transparent control on top of an indicator on the front panel, but the control ends up on the bottom. How do I make the control appear in front?

    Right click on the control then to create - > node of property.On node of property click right then to change into any writing then it is enough to connect true so that the control is visible false invisible.Create a rocker between the two controls and the turns and played

  • Duplicate Picture on Front Panel to Secondary Monitor

    On my front panel, I have a bunch of controls (numerical, and buttons) and a picture. However, I want to be able to duplicate that picture to take up the entirty of my secondary monitor (in this case a projector). I know how to move the front panel to a secondary monitor, however I just want a copy picture to be on the monitor so that I am able to use my controls and see the picture on the front panel on my laptop. I also have access to IMAQ, but am very new to it and dont know all of its capabilities.

    I have done exactly that. I created a separate Display.vi. It has a 2D Picture control on the front panel and a Rectangle cluster which gets the size of the image from the calling VI.
    The calling VI creates the picture to be displayed and sets the zoom factor on the image to fill the control.
    Enhancements I have thought about but have not added would include getting the monitor information from the OS and adjusting the size of the picture control to fill the screen and to have it either select the secondary monitor automatically or provide for manual setup adjustment.  This has been part of a very low priority project over several years.
    Lynn
    Attachments:
    Display.vi ‏11 KB

  • Refresh graph properties (colors...) when front panel not opened

    I have a problem with setting the plot properties of a multiple xy-graph.
    I first pass the data (n plots, number variable) to the graph control, THEN I set the according properties like color, line style etc. by a property node beginning with "active plot" followed by the properties. So when I set them, the xy-graph is already initialized with n plots.
    Afterwards, I take the graph picture and save it to a bitmap-file.
    That works fine as long as the front panel is opened or the number of plots and their attributes stays constant. But if the panel is closed (which is the default of that VI) and the number of plots changes, I get only as many plots plotted correctly as there are shown in the plot legend
    - regardless of if the legend is shown or not.
    I don't like the idea of having a huge legend on the panel which still might be too small sometimes or having the legend scaled by it's height-property in pixels.
    What I need is something like a .refresh-method that forces the graph to update even if the front panel is closed. Any idea how to do this?
    Cheers & thanks, Daniel

    The issue you are seeing is because LabVIEW doesn't update the controls/indicator of a front panel that is not open. This is done to save computer resources. The simple way around this is to use VI server to open the front panel for it to update and then close it again. You can use the VI property FP.position to move the window offscreen where it can't be seen and perform the open/close. This will get you the results you are after while still allowing the illusion of a closed front panel.

  • How do I load a print screen image into a picture indicator?

    Hi,
    I am trying to load a printscreen image into a picture indicator without first saving it. I am currently doing it by acquiring and saving a print screen image, then reloading and displaying the bitmap file. This works, but it is not elegant and the colors are displayed wrong. (The SnapView.vi is from the G Toolbox for LabVIEW) Thanks for your help.
    Peter Buerki
    Attachments:
    Test PrintScreen.vi ‏29 KB

    Hello –
    When you push the print screen button in your keyboard, the image is send (temporarily stored) to the clipboard.
    You could call the Windows API to recover that image and send it to an indicator in the front panel. This Example Program can show you how to make Windows API calls; I think you might find it useful to get started in programming your application.
    Hope this helps.
    SVences
    Applications Engineer
    National Instruments

  • How can I display a changing variable in a subvi on the front panel of the main vi as the subvi is excuting

    In the document attached the vi on the right is sub to the vi on the left. On the subvi on the right the variable "Field Reading" is continuously updated on the front panel of the subvi as the "for" loop is executed, but only the last value of the variable is updated on the main vi front panel which is what is expected. My question is how can I display the changing value of "Field Reading" on the main vi front panel as the "for" loop in the subvi is running?
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    Doc2.docx ‏554 KB

    Hopefully I can explain it well enough. It really is simple.
    1) Create an empty global variable and call it something like User Interface References.vi
    2) For each and every control and indicator on your front panel, right-click and select Create/Reference
    3) Place these references wherever you like (I use a series of Event cases to perform my initialisation and these all live in one of these event cases). They can be placed anywhere in the main vi.
    4) For each of the references, right-click and select Create/Indicator
    5) Moving to the front panel, Cut all the indicators and Paste them in the global variable (eg. User Interface References.vi)
    6) Moving back to the block diagram, wire the global variable to each of the references and select the same named global variable.
    All the hard work is now done (until you add another user interface terminal). You should now have something that look as shown below, [except the reference labels would be to the left (not sure why the snippet put them above)]. In my latest program I have 82 references!
    Done. You can now access all your front panel controls and indicators anywhere in your program as shown below.
    You can just select Value in most cases, but in this particular case I wanted to fire off an Event to do some things (log the alarm) as well as just update the value. So, this is another bonus with the method.
    Hopefully this all makes sense. If not, let me know.

  • How to display some html code in the front panel

    Hello.
    I am trying to properly display a few lines of html code in some kind of indicator on my front panel.
    I was trying to use an ActiveX container with MS IE in it, but all the methods I find are to make it navigate to a given URL. I did not find any method or property by which I could give it some html code and it would display it.
    Anybody know of a way to do this? It does not have to be using ActiveX or MS IE.
    Thanks in advance,
    Alejandro

    Here is a simple way using the activeX that I have embedded in some programs in the past. You will have to call the file path to show the file.
    Hope this helps some.
    -Dave
    Attachments:
    HTML Window.vi ‏36 KB

  • How to show or hide a control in front panel

    Hi All, I am revising the code from someone else, and a control in front panel seems to be hidden until you click something to make it show. I tried to use right click in front panel and it did not work by clicking something related to show or hide. Since I don't quite familiar with property nodes, this hidden setting may be related to that.
    In the picture it shows the front panel and its two property nodes, could anyone advise me how to change the setting to show this control? Thank you!
    Solved!
    Go to Solution.

    If you right-click on the the control's terminal, you will see an option to "Hide Control" or "Show Control".  This is what you should use when editing the code.  The property nodes set to Visible are for when the application is running.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    change visible state.png ‏3 KB

  • Why am I unable to select the boolean indicators on my front panel?

    Hello all,
    This has to be an easy one for you guys, but here goes...
    I created a front panel with approximately 20 boolean indicators on it (LEDs). I realized that I only had 10 functional, so I made the others 'greyed out and disabled'. Well, now the ones I disabled are functional again, so I want to enable them. Problem is, when I go to the diagram and select 'show indicator' it is still grayed out. I cannot click on the indicator on the front panel to 'enable' the indicators. I cannot select them at all.
    I've tried creating property nodes and enabling them that way. They are no longer grayed out when I do this, but I still cannot click on them to move them about the front panel.
    All
    I want to do is select them so I can rearrange the way they look on the panel, but I cannot click on them.
    And, yes, I've had my tool palete on both 'Automatic Tool Selection' and 'Position/Size/Select'. It is also interesting that I can select and move the indicators which I never disabled in the first place.
    Any help would be great!
    Thanks in advance,
    Dave Neumann
    [email protected]

    "Neumannium" wrote in message
    news:[email protected]..
    > Paul,
    >
    > Part of the problem is that I cannot click on them at all. If I try
    > to right click, the Controls palette pops up (like it would if there's
    > nothing on the front panel).
    >
    > If I drag a box around them, they are not selected. It's as if they
    > don't exist, but they do! They still function -- I can still run the
    > test and the booleans react as they should, but they are not where I
    > want them to be (the user cannot see them all without scrolling).
    What happens if you go to the diagram and double click on the control? It
    should take you to the front panel and highlight/select the control.

  • Dynamicall​y change image in another front panel

    Hi everyone,
    I have a 2D picture that is shown full screen on another front panel and when i enter new inputs (focal length or wavelength) in the main front panel, the picture in that second front panel will change. But I want the picture in the second front panel to be changed dynamically when I enter new inputs. I've tried doing it using a button ("Full screen") to make the picture change but it only be changed if i close the full screen picture and click on the button again. I would like to know if there are other ways of changing the picture dynamically without using any buttons.
    Thanks
    Attachments:
    image parameter.vi ‏13 KB
    RadiusOfEachPixel(SubVI).vi ‏14 KB
    Phase Value (SubVI).vi ‏17 KB

    Attachments:
    createBMP (SubVI).vi ‏17 KB
    arraylens (SubVI).vi ‏23 KB
    Pop Up Window.vi ‏19 KB

  • How can I simultaneously acquire and display an image on the front panel using a PCI-1424

    Dear friends;
    I want to use PCI-1424  , and labview 5.1 to capture the image,  But I can not find some functions in labview to capture, display and save the image.Can you be kind to share some examples or provide some information.
    Another question is how I CAN display the image in the front panel.
    thanks so much

    Hello yangshang,
    Thank you for contacting National Instruments!  To acquire images from the 1424 you will need NI IMAQ 2.5.1 or later.  This can be found HERE on our drivers download page.  One thing to note is that in LabVIEW 5 we only had the ability to view an IMAQ image as a pop up window.  This VI is called "IMAQ Windraw".  This will pop up a separate window that will display your picture.  If you need to view the picture on the front panel you can try saving the image as a file (BMP, JPG, etc) then use the LabVIEW Graphics and Sound VI's to Read a picture file in and then wire the picture to a picture control on the front panel.  Let me know if you have anymore questions.  Good Luck.
    Regards,
    Mark T
    Applications Engineer | National Instruments

Maybe you are looking for