Jump to content

salikatt

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by salikatt

  1. Hi

    Thanks for your replay Neville D

    I will re-organize my code to your recomendation at a later stage. I actually solved my problem, i had done a blunder in the NP_serial sub vi. I did not close all ports properly when closing application so when I tried the exe-file the ports were already occupied. I also did som chages in the build properties, I put the NP_Serial in "always included".

    -kl

  2. Hi you all,

    I have been searching all over this forum trying to find how I reference a sub vi when compiled to exe-file, i mean to be able to show/close front panel of the sub vi. It runs nicely from project but not when compiled. The sub vi is just a serial port reader, showing buffers, error messages etc. At the moment I'm able to open sub vi (NP_Serial) running the EXE file, but the VISA reports an argument error. If I delete Static VI ref. the NP_Serial is working fine, but i'm not able to show the Front Panel when using EXE file.

    I have also been trying the open.method but with the same result.

    post-10678-1222288027.png?width=400

    Anyone hwo can help me out?

    I know i can use the custom settings - "show when called", but that is not convinient for me as the sub vi is called every loop from the top vi.

    regards

    Kenneth

  3. QUOTE (Justin Goeres @ May 27 2008, 09:26 PM)

    Generally speaking, using Property Nodes & References just to avoid block diagram clutter is a seductive, but wrong approach. It seems like a great idea, but as jgcode pointed out, it means taking a shortcut around dataflow. That can lead to really, really hard-to-find bugs in your code later on. For small, single developer projects you can probably get away with it, but it's better to just use good practices from the outset so you don't have to worry about how it scales later on.

    As for the more general problem of block diagram clutter, there are various ways to deal with that, including functional globals, decoupling of controls/indicators from the data they contain, by-reference and/or by-value objects, etc.

    Ok, I'll stick to the recommended method. Thanks!

  4. QUOTE (jgcode @ May 27 2008, 02:06 PM)

    If you are only writing the value of the cluster to the .ini why not just pass by wire so you can follow you code using dataflow?

    Or is there some particular reason to use references/property nodes?

    It's jsut the way the clusters are arranged on the block diagram. It's going to be a lot of wires around. But I guess it's better than the other solution with reference/propoerty nodes then.

  5. I have several clusters on the main vi that holds user settings for charts (i.e target value, upper/lower limit etc). I have created references to each cluster. I will use this references in a sub vi that will write currect settings to a INI file by using the OpenG.

    The method I have been used is to link the cluster reference to subvi as a refnum, then property node to get the cluster values that is written to the INI file.

    I find this a bit difficult, especially to keep control of which clusters referred to wich refnum. Anybody know a better way of doing this?

    Thanks!

    post-10678-1211879557.png?width=400

×
×
  • Create New...

Important Information

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