Jump to content

programmatically empty waveform chart?


Gabi1

Recommended Posts

If it is in a cluster then you will have to get the reference to the cluster. then use a property node to get the controls reference array. index the array to the proper control. (same as tab order in a cluster), then using another property node write an empty array to the value or to the history data.

or you could right click on the chart in question and select creat property node/ value or History data and wire an empty array to it.

Link to comment

QUOTE(jhoskins @ Jan 25 2008, 08:38 PM)

If it is in a cluster then you will have to get the reference to the cluster. then use a property node to get the controls reference array. index the array to the proper control. (same as tab order in a cluster), then using another property node write an empty array to the value or to the history data.

or you could right click on the chart in question and select creat property node/ value or History data and wire an empty array to it.

i have no problem referencing the waveform. but i cant find the property to clear the chart. writing an empty arry doesnt do the tric (history data is kept in the waveform itself, and is not retrievable to my knowledge).

Link to comment

QUOTE(Gabi1 @ Jan 25 2008, 02:27 PM)

i have no problem referencing the waveform. but i cant find the property to clear the chart. writing an empty arry doesnt do the tric (history data is kept in the waveform itself, and is not retrievable to my knowledge).

It's work for me.

This is the definition NI give to this Property.

QUOTE(Property: History data)

Array of the history data of a chart. Wire an empty array to this property to clear the chart history.

Link to comment

QUOTE(Gabi1 @ Jan 25 2008, 11:27 AM)

i have no problem referencing the waveform. but i cant find the property to clear the chart. writing an empty arry doesnt do the tric (history data is kept in the waveform itself, and is not retrievable to my knowledge).

??? Why not?

Post your code.

Neville.

Link to comment

QUOTE(Gabi1 @ Jan 25 2008, 01:24 PM)

Ok Jhoskin gave the tip: right click on the chart itself and get the 'history' property. it still puzzle me tough, as i cant find it the usual way - see picture.

http://lavag.org/old_files/monthly_01_2008/post-9210-1201295865.png' target="_blank">post-9210-1201295865.png?width=400

Ben and Normandinf! Now i get it.now next step: why and how? why strict, what does it mean for a class specifier, and how to find it?Thanks a bunch!

Fourth and last edit:

one get the strict class specifier as a constant of a reference to the chart.

That makes it very annoying for charts in clusters, but if strict is necessary, it is understandable there would be no other way. i dont get yet why it has to be strict tough. Doesnt make sense to me, as one has the reference to the specific control already.

It would be great for a little online (while wiring) documentation on this type of limitations. would have saved me 50min of looking around.

Why not just use Chart>right-click property>history? Is there anything wrong with using the easier way?

Keep in mind performance implications if you are using the other way. Don't mess unnecessarily with references unless you have to. The cast doesn't work probably because you can have charts with various data types.. SGL, DBL, cluster, Array etc.

Neville.

Link to comment

QUOTE(Gabi1 @ Jan 25 2008, 04:24 PM)

now next step: why and how? why strict, what does it mean for a class specifier, and how to find it?Thanks a bunch!

To create a strict type reference of a waveform chart, right-click on waveform chart and create a reference. Then, in the block diagram, right-click on the reference you just created and create a constant. This newly created reference will be "strict" type.

Link to comment

QUOTE(Neville D @ Jan 25 2008, 11:41 PM)

Why not just use Chart>right-click property>history? Is there anything wrong with using the easier way?

Well it is mainly my personal taste, and the way i document things: having a property node for a FP element with its name directly connected i good when i have relatively few such elements. however, in this particular code i have a FP that uses a tab control with several tens of elements. then, i group most of my elements into clusters (type def) that refer to a specific operation or stage in the UI utilisation. then, most of the time changing properties for the controls in the cluster as a whole has avdvantages, and can be treated by reference to a case structure inside a for loop.

in short - i got used to do it this way.

of course, once i actually need to get a strict reference specifier, i loose this advantage, since i need to go and find it directly from the control itself...

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
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.