Jump to content

Arranging Boolean array members on front panel


Recommended Posts

Hello all:

This is my first forum post. I have a large number of Boolean indicators on the front panel of my application that simulates railroad movements and signalling on a track diagram. I want to have these indicators contained within an array so that I can write Boolean state info to each indicator without a lot of block diagram wiring, but don't know how to do this when the indicators are dispersed at various locations around the front panel (vs. adding an indicator to a rectangular array "container" in the usual way when the front panel objects are built).

I would much appreciate any suggestions you may have.

Thanks!

Oliver Barrett

CLAD

www.linkedin.com/in/orbarrett

Link to comment

QUOTE (Oliver Barrett @ Mar 13 2009, 03:09 PM)

Hello all:

This is my first forum post. I have a large number of Boolean indicators on the front panel of my application that simulates railroad movements and signalling on a track diagram. I want to have these indicators contained within an array so that I can write Boolean state info to each indicator without a lot of block diagram wiring, but don't know how to do this when the indicators are dispersed at various locations around the front panel (vs. adding an indicator to a rectangular array "container" in the usual way when the front panel objects are built).

I would much appreciate any suggestions you may have.

Thanks!

Oliver Barrett

CLAD

www.linkedin.com/in/orbarrett

You could place all your booleans in a cluster (hide the frame if desired). The implement your BD logic using an array. The Cluster to Array and Array to Cluster primatives when time to update the FP control.

Link to comment

As an alternative you could keep the controls as individual controls and update them using references. If you were to do this I would probably encapsulate the management of the controls and references into a functional global and reference the specific boolean by name or some such identifier. This way they can remain as separate controls yet you would be able to manage them in a consistent and expandable manner.

Link to comment

QUOTE (Dan DeFriese @ Mar 13 2009, 03:25 PM)

You could place all your booleans in a cluster (hide the frame if desired). The implement your BD logic using an array. The Cluster to Array and Array to Cluster primatives when time to update the FP control.

:thumbup:

Link to comment

Hello all,

Thank you for the the replies. I'm actually storing a composite binary code to store the signal states in a functional global already, which helps. I thought of using the phantom cluster approach, but I expect that the cluster border (even if transparent) would have to be expanded to cover a large area of the front panel where my indicators are placed. Since I actually have three groups of indicators that cover different functional purposes, their cluster boundaries would have to overlap, don't know whether that would be an issue.

I'll think about this approach further though.

Regards,

Oliver

Link to comment

QUOTE (Mark Yedinak @ Mar 13 2009, 09:43 PM)

Here is a little bit code that demonstrates what Mark is describing:

post-2399-1237020912.png?width=400

QUOTE (Oliver Barrett @ Mar 14 2009, 05:55 AM)

I thought of using the phantom cluster approach, but I expect that the cluster border (even if transparent) would have to be expanded to cover a large area of the front panel where my indicators are placed. Since I actually have three groups of indicators that cover different functional purposes, their cluster boundaries would have to overlap, don't know whether that would be an issue.

That might introduce a speed issue, controls overlapping each will all be redrawn if one of them needs to be redrawn, I don't know how far this goes for clusters but I would discourage them.

Ton

Link to comment

You can also combine the FG and references method to have more readable and safer code by doing something like this. You can update the controls using the Value property.

Alternatively, if you're using 8.6, you can try using tags to mark the "owner" and "position" of each boolean and iterate over their references. There should be tagging VIs in vi.lib somewhere (I think in the Utility folder), although you probably want to check that they work fast enough and that they work in an EXE as you would expect before using them extensively.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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