Adding a Spreadsheet to the Front Panel

Hi,
I want to add something like a spreadheet to my front panel and I need some recommendations.  I want to allow values to be entered at runtime and I like the ability of locking certain cells and changing font attributes of cells.
I tried adding an ActiveX Document (Create Document or Object from File) but the spreadsheet can't be edited at run-time but I think I can access all the properties and methods I need.  I also tried adding the Microsoft Office Spreadsheet in Create Control (ActiveX also) and it behaves well on the Front Panel but I can't figure out how to get to the properties I need like values in a certain range.  I think I have a problem using the Variant to Data function; I can't figure out how to make a type for Variant to Data.
I'm relatively new to LabVIEW so I might be missing something obvious but I think I have good general understaning of it.  I'm normally a C/C++ programmer.
Thanks,
Albert

Here is a vi to use as an example if you want to use active x. If you have LV 8 just use a table and set the parameters as desired. If you need anymore assistance i will try to help.
Joe.
"NOTHING IS EVER EASY"
Attachments:
excel style spreadsheet.vi ‏15 KB

Similar Messages

  • Is there any way to prevent excess rows from being added to a table on the front panel?

    Whenever I programmatically add rows through a property node I can still go into the front panel and keep adding additional rows through the table. Is there any way to prevent this "excess scrolling"? Maybe grey out the rows or something? 
    At least I have chicken

    Hello Labviewleroy,
    You should be able to right click on the table on the front panel and select
    Visible Items>>Horizontal Scrollbar or Vertical Scrollbar
    You could also consider changing their visibility programmatically using a property node for the control or indicator that you are referencing. You can create the property node by right clicking on the control on the block diagram and selecting
    Create>>Property Node>>Visible Items>>Horizontal Scrollbar or Vertical Scrollbar
    Cheers,
    -Joel
    Motion PSE
    National Instruments

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • How can i print an excel spreadshee​t file by clicking a button on the front panel

    i have designed a vi that logs data into an excel spreadsheet. i want to take print out of the file when the user clicks a button on the front panel. what to do if there is very large amount of data.

    Preet,
    Printing the Excel sheet is just an ActiveX method call to print the worksheet. To add data to the worksheet, you already have the reference, just call a print method. As for handling large amounts of data, that is a vague question. The data will print how ever you placed it on the worksheet. If what you mean is that you don't want to print out 25 pages every time, the print method has options to only print specific pages or ranges. You may want to play around with a sample spreadsheet to learn the printing options. For help on the ActiveX functions, make sure you have the Visual Basic help installed for Excel.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • How do I input data to a table on the front panel and stop the program immediatel​y as button is pressed?

    What should I do if I want to display on the front panel in real time the values from Polarizer #, P1, P2 and the last calculated value (P2/P1 * 100) called T% in a table or some graphical representation like that?  What would I have to do?  It could just be Polarizer # and T% if that would be simpler.  I just want to let the user know the values in a list, spreadsheet or table as they go.  One last thing is that I would like to be able to stop the program at any point in time as soon as the stop button is pressed.  As of now, when the button is pressed it goes through the iteration currently in progress and then one afterwards.  I want the program to end as soon as the stop button is pressed no matter what sequence it is.  What can I do to achieve this?  Could you give me an example or modify my program to show me this.
    Thanks,
    Steve
    Stephen Coward
    Northrop Grumman
    [email protected]
    Attachments:
    EPM2000 almost done.vi ‏50 KB

    Put a single frame sequence structure around your stop button and then wire from the error cluster going into the error handler to the edge of the sequence structure. Now your code will stop at the end of the current iteration. To see why this works, watch you code execute with execution highlighting turned on and review the section of the manual talking about "Dataflow".
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Hi i am new to labview. i want to extract data from a text file and display it on the front panel. how do i proceed??

    Hi i am new to labview
    I want to extract data from a text file and display it on the front panel.
    How do i proceed??
    I have attached a file for your brief idea...
    Attachments:
    extract.jpg ‏3797 KB

    RoopeshV wrote:
    Hi,
    The below code shows how to read from txt file and display in the perticular fields.
    Why have you used waveform?
    Regards,
    Roopesh
    There are so many things wrong with this VI, I'm not even sure where to start.
    Hard-coding paths that point to your user folder on the block diagram. What if somebody else tries to run it? They'll get an error. What if somebody tries to run this on Windows 7? They'll get an error. What if somebody tries to run this on a Mac or Linux? They'll get an error.
    Not using Read From Spreadsheet File.
    Use of local variables to populate an array.
    Cannot insert values into an empty array.
    What if there's a line missing from the text file? Now your data will not line up. Your case structure does handle this.
    Also, how does this answer the poster's question?

  • I've got the labview vi written to read my IMU data from a serial port in COM1 and it displays onto the table on the front panel. I'm having trouble getting this data onto an excel spreadshee​t. Any ideas?

    I've got the labview vi written to read my IMU data from a serial port in COM1 and it displays onto the table on the front panel. I'm having trouble getting this data onto an excel spreadsheet. Any ideas? Right now my data will collect one reading instead of continuously reading my IMU which displays data in a continuous stream.
    Thanks
    Attachments:
    Read_IMU_Drew.vi ‏21 KB

    Hi
    Your vi is in 2009 version, which i am unable to open in 8.6
    However, if you want your data to be saved in excel sheet, here is the VI
    Somil Gautam
    Think Weird
    Attachments:
    save to excel.vi ‏12 KB

  • Is there a way to use the built-in Datalogging and programmatically log the front panel while the vi is running?

    I would like to use the built-in Data Logging feature. There is the "Log at Completion" option, but is there a way to programmatically make a new log record while running? I looked around in VI server and couldn't find any methods that would do that. Currently, I am grabbing all of the front panel control references using VI Server and if there are any changes, the changed values are written to a log file along with a date/time stamp. I'm mostly dealing with buttons, which simply change from 0 to 1 or 1 to 0, so it's not too hard to visualize what was pressed. It works okay for reconstructing what happened, but it would be much nicer to use the built-in fe
    ature because you can "replay" directly onto the front panel and actually see what the changes were. However, without being able to programmatically make a new log, it won't work for me.

    Jake,
    There are several options here.
    I would suggest using your own code for datalogging. The datalogging you are referring to is primarily for debug, and one shot datalogs of front panel indicators (and controls?), not including graphs, etc.
    If you go to the file functions, you will see a menu for datalogging. These functions will allow you to save your data, as you need it, simply, and in a compact format.
    I recommend opening the datalog file, doing all your file operations, and closing the file before the program is complete. There are several examples of this in the examples database.
    Good luck

  • Why doesn't LabView scale my objects properly in the front panel?

    In LabView 6.02 (Windows 2000) I have experienced problems when using the "Scale all objects on panel as the window resizes" option under VI properties. Try the following example: Go to the front panel and draw two arrows (from Decorations), one vertical and one horizontal (make sure they are perfectly straight). Now, resize the window, using the bottom right corner several times. You will soon find that the two arrows become increasingly missaligned and are not perpendicular to each other anymore. The problem gets worse the more you play around with the window size and they will never return to their original state. Installing the 6.02 patch did not seem to help at all.

    Dear Gustav,
    First of all, some objects do not scale whatsoever in LabVIEW. These include refnum controls and text.
    As far as the "scale all objects on the front panel as the window resizes" option goes, you have brought attention to an issue that I will announce to the R&D team. Currently, when you resize the screen, the objects on the front panel are resized at the same fraction of the original size, yet small rounding errors occur. As you move the window around, this small rounding error multiplies accordingly. Once you maximize the window, the small rounding error is translated into a large-scale degree change in the orientation of the (previously) perpendicular arrows.
    What action are you trying to perform that caused this issue? If possible,
    please post some screen shots of your front panel or give me explicit details as to your programmatic goal.
    One thing that you may try in order to prevent this misalignment and orientation shift is to highlight the arrows. Then, click the "Reorder" button on the toolbar and select [lock]. This will lock the objects and prevent them from resizing while the rest of the screen resizes (see attached image).
    Again, I'm sorry if the aforementioned phenomenon causes you any inconveniences, and I will be sure to announce this issue so that preventive changes are implemented in future LabVIEW revisions.
    I hope this helps. Please let me know if you need any further assistance. Have a great day!
    Kind Regards,
    Joe Des Rosier
    National Instruments
    Attachments:
    lock.JPG ‏33 KB

  • How can I display the front panel of the dinamically loaded VI on the cliente computer, the VI dinamically loaded contains files, I want to see the files that the server machine has, in the client machine

    I can successfully view and control a VI remotly. However, the remote VI dinamically loads another VI, this VI loaded dinamically is a VI that allows open others VIs, I want to see the files that contains the server machine, in the client machine, but the front panel of the dinamic VI appears only on the server and not on the client, How can I display the fron panel with the files of the server machine of the dinamically loaded VI on the client computer?
    Attachments:
    micliente.llb ‏183 KB
    miservidor.llb ‏186 KB
    rdsubvis.llb ‏214 KB

    I down loaded your files but could use some instructions on what needs run.
    It seems that you are so close yet so far. You need to get the data on the server machine over to the client. I generally do this by doing a call by reference (on the client machine) of a VI that is served by the server. THe VI that executes on the server should pass the data you want to diplay via one of its output terminals. You can simply wire from this terminal (back on the client again) to an indicator of your choosing.
    Now theorectically, I do not think that there is anything that prevents use from getting the control refnum of the actual indicator (on the server) of the indicator that has the data, and read its "Value" using a property node. I have never tried this idea but it seems t
    hat all of the parts are there. You will need to know the name of the VI that holds the data as well as the indicator's name. You will also have to serve all VI's. This is not a good idea.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • 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 can I display the name of my refnum on the front panel?

    I am writing data to a file. To do this, I am using "Open/Create/Replace File" to prompt the user for a filename, which is then output to my VI as a refnum. I then write strings to this file with "Write to Text File".
    How can I display this filename (with the path) on the front panel after the user has input it?
    Michael
    Solved!
    Go to Solution.
    Attachments:
    refnum.JPG ‏45 KB

    Use the Refnum to Path function, in File I/O -> Advanced File Functions palette. You can wire this to a path indicator.

  • Is there a way to create a button on the front panel that would automatically open the txt file data is being stored to?

    I am saving data read from FieldPoint to a .txt file. Is there a way to create a button on the front panel so that when the user pushes this button it automatically opens the .txt folder in notepad? I want to bypass the user having to find the file in the computer in order to open it.

    Hi jem,
    I suggest that you break this up into three seperate questions and re-post to this list. That way you get more ideas from others that may have better insites than myself.
    Re:the sysexec
    The Sysexec will allow you to execute a dos command. This is the equivalent of going to
    Start>>>Run
    What you should do is find the proper DOS command sysntax that is required to open a text file in notepad or your favorite editor. Once you know what a good DOS command is, you should pass that string to the Sysexec.VI. The Sysexec has an input that allows you to choose if the code waits for the command to complete or if it should just start the program and let it run in the background. Sysexec will open its own window to run the command you speci
    fiy.
    Ben
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • When I call an external program from Labview, how can I embed the interface into the front panel?

    I'm running Labiew 6i for Linux. I'm using a system exec.vi to call an external program to do image manipulation (since there is no IMAQ for linux). How can I embed the user interface of the external program into the front panel of Labview?

    As far as I know, the only way to embed other GUIs in LabView is an ActiveX in a container.
    As long as you are using Linux, try to place (moving them on the desktop ) the two windows linked (like those 3 of WinAmp).

  • How to get rid of the reference lines on the front panel

    I forgot how I created a couple of horizontal and vertical reference lines on the front panel. It looks like the origin lines on the front panel. When I move my program to another monitor with different resolution, all the layout is messed up because of the reference lines can not change with the resolution. Did anybody meet this before? How to get rid of them?
    Attached are the 2 creen shot of front panels.
    Thanks in advanced.
    Solved!
    Go to Solution.
    Attachments:
    front panel.png ‏63 KB
    front panel2.png ‏42 KB

    You will have to click on the top menu and choose options see below
    when you do this window will pop up and you scroll down until you get to the front panel options. See below
    Tim
    Johnson Controls
    Holland Michigan

Maybe you are looking for