Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/31/2013 in all areas

  1. Just a warning: All of the advice I've read above is good. But you'll see a lot of VIs from NI that use rings and think "surely they should've used an enum for this!" The trouble is that enums change datatype when you change their text. That means recompiling the VIs. When we localize VIs (translate to foreign languages), we want to be able to export strings, translate, and import the strings right back into the VIs without changing functionality or needing to mass compile afterward. So we use a lot more rings than we might otherwise do. This bothers the heck out of me from time to time -- rings as block diagram constants or wired to case structures aren't nearly so useful as enums -- but various suggestions for how to improve the situation have been poor at best. Most users don't face this problem. When you write a VI, you can cleanly separate the front panel that your end user will see from the block diagram that you use internally, so you can easily follow the general rule of "use a ring on the FP, then use a single VI to translate ring values to enum values and work with the enum on the block diagram" that a lot of G developers use. But for NI, our customers are the programmers, and we have to allow for localization even of our diagrams. So we end up with rings where anyone else would use an enum.
    2 points
  2. Also, don't forget about enabling NI-VISA Server for remote access. I've installed NI-VISA server in the lab on a PC and a GPIB card so I could develop code from my local PC with only the SCPI commands going across the network. It works for other connection types too... This describes the general process... http://digital.ni.com/public.nsf/allkb/F3AB0B5D7DBA367C86257982005BBF2C
    1 point
  3. You'll be happy to hear that people have thought of similar things before (for instance - http://forums.ni.com/t5/LabVIEW/LV2OO-Style-Global-VIs-from-NI-Week-2007-presentation/td-p/562527) and that LV has a much simpler mechanism for doing this - create a regular class, then create a data value reference to an object of that class. The DVR allows you to access the object using the reference. If you create property folders for the class, then the property node can even accept a DVR and get the object out of it automatically. A simple example:
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.