New to LabView and Fieldpoint I/O

This may be an obvious kind of question, but this is my first app. I would like to easily access individual points of my FP from several places in my app, and I'm considering using global variables to pass my data back and forth to a "service" VI that will actually read and write the data to the serial port. So far, this seems to be working, but I'm wondering if there's a better way. It would seem like opening and closing ports, generating tags and writing directly to the I/O from within the main VI's would be rather wasteful of resources.
Any insight would be appreciated!

Hi Charlie,
I don't know how I missed your question earlier. Must have been one of those days I skipped out.
What you are looking for is a variation on the "functional Global" called a "Action Engine". I use these to serve as a central clearing house of related I/O groups.
The Idea goes as follows. You take the functional global that comes with a read and write and add the functions you will be perfroming in your code. Functions are added by adding new cases. Common functions for FP would be Open, Close, Read, Write, etc. Insatead of the functional global just soring a value, it uses a connection ID that is stored in one of the Action engine's shift registers. The last read value can also be stored there so that a dozen threads monitoring a "stop" button I/O poi
nt don't cause alot of extra I/O. The last witten values saved in another shifter register is actually preferable to read from the FP output point due to latencies.
Ask away if you need more details.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • I am new to Labview and was wondering if it is possib

    le to control Labview via an external script? I am trying to automate my testing and want to use a script to send commands that will call my equipment.vi models and have it configure the equipment via GPIB to the test instruments. Thanks in advance - HeidiI am trying to automate my testing and want to use a script to send commands that will call my quipment.vi models and have it configure the equipment via GPIB to the test instruments. This will take out the GUI interface and still allow my model .vi's to control my equipment. - Thanks in advance - Heidi

    le to control Labview via an external script? I am trying to automate my testing and want to use a script to send commands that will call my equipment.vi models and have it configure the equipment via GPIB to the test instruments. Thanks in advance - HeidiHi Heidi.
    Check out this link from Jeffrey Travis
    http://www.jeffreytravis.com/lost/labperl.html
    "LabPerl is a cross-platform API for letting LabVIEW and Perl communicate. It consists of some LabVIEW VIs and 2 Perl modules (.pm) files that allow Perl functions to call LabVIEW VIs and pass data, and viceversa. You should be somewhat familiar with Perl before trying to use LabPerl."
    I do not know if it will do what you want as I never tried it, but it is worth a try.
    PJM
    Got EasyXML?
    JKI.VIPM.EasyXML.OpenG.LAVA.Builder.blog

  • Measuring Low Frequencies with LabVIEW and FieldPoint Using [c]FP-CTR-500/502

    I am trying to use this example in a LabView 8.0 and a Field Point FP-CTR-502 module but without any sensor I get frequency and period values.
    Is that possible to use this example with LabView 8.0 or not?
    I am trying to use an anemometer Campbel Scientific A100R.
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3ED7556A4E034080020E74861&p_node=174404&p_source=External
    Attachments:
    Low_Frequency_Measurement_CTR_LV71.vi ‏193 KB

    You can launch MAX from start\programs\National Instruments\Measurement & automation.
    Concerning source signal wiring, you can have a look to the following link : http://zone.ni.com/devzone/conceptd.nsf/webmain/01F147E156A1BE15862568650057DF15?opendocument
    Hope this helps,
    Manuel R
    AE dans une autre vie

  • I am new to LabVIEW and I am having the classic problem of trying to configure several digital I/O lines in a single VI

    . I am using a PCI-1200 with 3 8255's. I wish to configure port a to all digital outputs. I want to control the states of the individual lines with boolean switches. I seem to get a strange mix of states on the outputs when I have more than one switch.

    . I am using a PCI-1200 with 3 8255's. I wish to configure port a to all digital outputs. I want to control the states of the individual lines with boolean switches. I seem to get a strange mix of states on the outputs when I have more than one switch.Have you looked at the examples? There's one called Write to 2 Dig Ports(8255).vi. It uses front panel Booleans and it looks easy to modify for three ports.

  • Count the number of seeds using labview - new to labview

    hello,
    I am new to labview and need to create a VI to count the number of seeds being dropped.
    I understand you can do this using labview.
    please can someone direct me to a tutorial or an example to do this?
    I use a camera - how do you connect up the camera to work with labview?
    thanks

    You'll have to use IMAQ vision, an addon package that brings LabVIEW a series of tools for image analysis.
    There are a number of examples/solutions. Some deal already with particle counting.
    Although your question is rather vague, I suppose you want to get more info tahn the mere particle number (shape, color). That's definitely possible with LabVIEW, but will require a significant investment.
    There is a forum dedicated to Machine Vision where you'll get all the required help.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Troubles with LabVIEW and the SR830 Lock-in Amp.

    i'm quite new to LabVIEW and am trying to use the sr830 instrument drivers
    to control the Lock-in from a computer, but the instrument drivers don't
    seem to want to send or recieve any data. if anyone who is more proficient
    in VI programming couild help me out with this, i would greatly appreciate
    a response. thanks.

    Lackey wrote:
    > i'm quite new to LabVIEW and am trying to use the sr830 instrument drivers
    > to control the Lock-in from a computer, but the instrument drivers don't
    > seem to want to send or recieve any data. if anyone who is more proficient
    > in VI programming couild help me out with this, i would greatly appreciate
    > a response. thanks.
    Are you using the instrument driver downloaded from Nat Inst ??
    If you are this thing looks terrible, but should work.
    You could try building a simple VI to see if all the communication is working
    properly.
    Check to make sure you have the correct GPIB address and that all the cables
    cards etc are properly connected and working.
    Kevin KEnt
    Attachments:
    Kevin.Kent.vcf ‏1 KB

  • 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?

  • Please Help!!! VIPM won't connect to labview and I need to figure out why

    I am trying to download the Arduino package from the VIPM and they won't seem to connect. I have included a picture of the error and two more of my settings. I am using the student evaluation of the Labview software, but I'm not sure that it is what's causing the problems. Any help would be appreciated, as I would like to set up a nice GUI using labview and an arduino as my DAQ device. I need this for a project for my professors so I am rather desperate to get it up and running.
    Attachments:
    Labview Error.jpg ‏352 KB
    Labview Error II.jpg ‏141 KB
    Labview Error III.jpg ‏108 KB

    No, i tried using you settings and stil not working. i went through every combination of the four items I have on the machine and export list. Still nothing, do you think that its that i am using the student version?
    Attachments:
    New Labview settings, not working.jpg ‏123 KB
    New Labview settings, not working.png ‏267 KB

  • New to LABVIEW. How can I use one analog channel to trigger acquisiton of a signal on another analog channel?

    I am new to using Labview and have been tasked to write data acqusition program for my company. We are attempting to log 6 machines, each with their own asynchronous trigger (I can't use one trigger for all 6 machines). I have the idea to use (for example) ai0 for the measurement and ai1 for the trigger (for one machine), yet I see nothing in the documentation on how this is done. I have tried playing around with the DAQ express VI (I am using Labview7) but still don't see a way to have the setup I am looking for. I'm sure this is a relatively easy question, but I'm unsure where to go to look for an answer. Any helpful pointers or guidance in the right direction
    would be very helpful!

    If what you want to do is start the acquisition of channel 0 when channel 1 reaches the trigger condition and not start channel 2 until channel 3 reaches it's trigger condition, then no, you cna't do that unless you have multiple daq devices. What can be easily done is continuously acquire all channels and monitor your trigger channels. When the trigger condition is met, then perform the analysis/logging. On the Analyze>Waveform Monitoring palette is the Basic Level Trigger Detection function. Use one for each trigger channel and have it return either the index or relative time of the trigger occurance. This value can then be used to idex that portion of the measurement channel that you're interested in.

  • Problems with Labview and Windows XP with error -214721786​5

    Hello. Im a new beginner in Labview and am having a problem with a error message
    I dont understand. Im running Labview on a pc-logger with windows XP.
    The program is written by a guy on my university, and logs voltage from
    a solar cell panel. He doesnt have the time to check in to it, so Im supposed to
    find out what's wrong.
    The error message is as follows :
    Error -2147217865 occured at Cmd Execute.vi->DB Tools Insert
    Data.vi->Solcelle.vi
    Possible reasons :
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers,
    [MySQL][ODBC 3.51 Driver][mysqld-3.23.38-log]Can't open file :
    'solcelledata.MYD'. (errno: 145). in Rec Create - Command.vi-
    >Cmd Execute.vi->DB Tools Insert Data.vi->Solcelle.vi
    I really hope someone can tell me what's wrong and specifically what to do
    with it, or possibly guide me to someone who could suggest a solution to this
    problem.
    Reguards
    chrisdee

    Hi Chrisdee,
          (.. not to discount what TimoS has suggested, however...) 
    Embedded in the error information you provided:
    ... Can't open file : 'solcelledata.MYD'.
    Sounds like the program needs this file?  Has the program been moved to a new location?
    just a wild guess!
    Cheers
    Message Edited by Dynamik on 10-06-2005 04:53 AM
    When they give imbeciles handicap-parking, I won't have so far to walk!

  • Please Help me in Labview and MS Access Database Connective

    Please Help me in LabVIEW and MS Access Database Connective through an example . I am new to LabVIEW .I need simple example that take a data from a table and display it on front panel .
    thanks in advance .

    duplicate post

  • Face and Eye Tracking with LabView and Vision

    Hey all,
    For my senior project I am trying to perform face tracking and eye tracking by using LabView and the Vision Development Module. Unfortunately I am new to LV and I'm drowning in a sea of links and tutorials so I was wondering if anyone here that has had experience performing similar tasks would be willing to help and point me in the right direction or provide examples. I bought two Logitech c525 webcams and hooked them up to my pc running LabView and Vision 2011. I was able to see images captured but that's as far as I've gotten with the tools. Any tips?
    Thanks,
    Alex.

    have a look at http://sine.ni.com/cs/app/doc/p/id/cs-14116 and http://forums.ni.com/t5/Machine-Vision/how-to-trac​k-face-and-allocate-lips-in-face-using-labview/td-​...
    This thread would also be more suited to the Machine Vision section.

  • How to connect mysql database to labview and plot the graph

    Hi all,
     I am doing my final year project about labview. I need to connect my mysql workbench database to labview and plotting two sinwave in same graph. I can already connected my labview to mysql and showing the data in labview table.But I need to plot the two sinwave in on graph according to table data. Eg: table data:      timestamp   wind speed  wind direction
                                                      ​                                                  ​                                                  ​                                            2004-01-01         0.5                 56
                                                      ​                                                  ​                                                  ​                                            2004-01-01         0.6                 60
      The attachemtn vi is about inserting file and plot the graph. And now I  want plotting the sinwave using table data and the  wind speed Y-axis,wind direction Y-axis in both side of my graph and the X-axis is showing the whole day timing like 00:00:00-24:00:00.  Can anybody combine these 2 vi to polting the graph according table data not according to file data.Thanks
    Attachments:
    Mysql.vi ‏11 KB
    Insert File.vi ‏25 KB
    Wind Project.vi ‏24 KB

    Please don't start a new thread. Stick to the original.
    http://forums.ni.com/t5/LabVIEW/How-to-plot-wavefo​rm-or-graph-using-table-database-which/td-p/294036​...

  • I am new to LabView. I need an example VI for doing RF third intermod measurements.

    I am using 2 Anritsu 2-40 GHz, and an Agilent Spectrum analyzer. I am in need of an example VI to get me started, since a am new to LabView.

    Thank You Aaron.
    Once initialized, the program will write instructions to, and read data from 2 Signal Generators, and 1 spectrum analyzer via GPIB. The comment is best left in an example format:
    Example:
    Measurement of third intermodulation distortion from 8.5 to 9.0 GHz at 0 dBm. Commands will be sent to Sig Gen A to go to 8.5 GHz CW (0 dBm power level), Gen B will go to 8.51 GHz (0 dBm power level). Commands will then go to the spectrum analyzer to set center frequency at 8.505 GHz, set span, set RBW, and set ampiltude. Next the spectrum analyzer will be commanded to do a peak search on the largest carrier (they should be fairly equal), set a marker, then do a delta marker at 8.52 and compare with another delta marker at 8.49 GHz and report the
    smallest delta between the two main carriers (8.5 and 8.51 GHz). Hence, the 3rd intermods will be present at 8.49 and 8.52 GHz. Their levels are to be reported in dBc in reference to the main carriers. The action will be repeated at the next frequency point(s).
    All will be communicated over GPIB. No additional hardware needed at this time.
    Performance can be tweaked. This is an RF R&D environment. I figured (and know)that someone out there has done this before and may could give me a "jump start".

  • Large applications - Labview and other programming languages

    Hello Labview Users,
    as the forum saw this very interesting thread about large applications programmed in Labview
    (see: http://sine.ni.com/niforum/niforum?requireLogin=False&forumDU=http://forums.ni.com/ni/board/message?... ) I would like to ask the community about their experiences with Labview applications in combination with other programming languages.
    In advance: I have several years of experience in programming Labview applications starting from quick-and-dirty solutions which had to run within few hours and complex test solutions. I saw Labview growing and becoming better with the released versions and lot of things I missed in former times got implemented in the meantime. Actually I have to develop a complexe ATE solution with numerous equipment to control and numerous data to be captured and archived. Despite the Verison 8 I still feel still some drawbacks of the LV concept which let me hestitate to setup the solution completly in Labview:
    1) It is alway hard to re-use code of complex applications since it is not possible to do some kind of global search an replace of functions
    variables etc. It nearly impossible to re-use approved code structures (e.g a state machine) if the "inner part" is changing more the a little bit.
    2) If the application requires a certain flexibility (e.g. exchangeable test equipment of varying vendors) this is hard to implement since you have to define a lot of parameters through your hierarchy if you dont want use global variables which slow down your application and hide
    the code functionality.
    3) Despite modern PCs the look and feel of LV applications appears somewhat slow compared to other applications. For complex user interfaces the polling methode generates a lot of complex code. (I dont have expierence with the event-structure).
    Now my questions:
    Do you have experience of implemention of complex solutions dividingthe code modules using Labview and other languages? Which other
    languages did you use? Why did you use these languages (speed, flexibility of text based code, available library functions)? Did you found out this to improve your development time and code maintainibility?
    (I concider a solution where I do the single tests with Labview-VIs but delegate all the test sequencing and data collection stuff written in PERL which allows really very compact code)
    I'm curious what your experiences are.
    rainercats

    Given that you're asking these questions in a forum for LabVIEW users the opinions given are going to be somewhat slanted towards the general like of LabVIEW. I've been working with LabVIEW for a long time, ever since 2.something on a Mac. I've written numerous large-scale applications as well as "mundane" instrument drivers. As you've noted you're experienced with LabVIEW, so you know some of its strengths and weaknesses.
    To address your specific questions:
    (1) Yes, that has always been a limitation in LabVIEW, but I don't believe it is an overriding one to choose C over LabVIEW. Putnam provided one workaround for the search and replace of VIs. Once you've programmed in LabVIEW long enough you get used to doing it this way. Is it clumsy? Yes. As for the re-use of code structures, that's not entirely true. You can create a "template" VI (a regular VI, not a .vit) that contains the code you want to re-use and place in your palette with the "Merge VI" option set. That way you can select it from your functions palette, plop it down on your diagram, and you get the "template" VI's diagram placed right into your new VI.
    (2) This is not something that is specific to LabVIEW, as this exists with any programming language. It's not the language that limits you here, it's how you've designed your code. In a language like C++ you would go with classes. You can do the same thing in LabVIEW. IVI is another option (though not preferred by me).
    (3) As Putnam mentioned, you should be using the event structure.
    Other thoughts:
    The biggest strength I see with LabVIEW is that each VI is a miniature program, which allows development and debugging of functions a snap. With a language like C you have to write another program to call that function in order to debug it. The biggest weakness? I would say user interface. Yes, even with the event structure. Don't get me wrong, the event structure has vastly improved the way user interfaces and event handling in general are done with LabVIEW, but it simply doesn't hold muster to a program written in C or VB. ActiveX anyone? LabVIEW still doesn't do ActiveX properly in terms of actually getting the controls to work. Programming ActiveX controls is just plain aggravating what with all the property nodes taking up so much diagram space.
    It certainly makes sense to use the best tools available to you to get the job done. In my recent projects I had to write software to run automated tests on some products my company made. The test modules were written in LabVIEW. The tests executive was a proprietary engine driven by a SQL Server database. I had to write a "wrapper" DLL that interfaced between the LabVIEW code and the executive since the executive hadn't been designed to call LabVIEW DLLs directly. This allowed us to use LabVIEW as the preferred language for developing the test modules and let the guys who were fiddling with the test executive do their bit. Of course, TestStand's premise is basically that.

Maybe you are looking for