Gabi1 Posted January 26, 2008 Report Share Posted January 26, 2008 i am turning around it for 30 min now, and it should be very simple: i have a waveform chart embedded in a cluster. i am trying to find a way to programatically clear the chart. but it seems there is no property node for that?? i must miss it somehow... Quote Link to comment
jhoskins Posted January 26, 2008 Report Share Posted January 26, 2008 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. Quote Link to comment
Gabi1 Posted January 26, 2008 Author Report Share Posted January 26, 2008 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). Quote Link to comment
LAVA 1.0 Content Posted January 26, 2008 Report Share Posted January 26, 2008 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. Quote Link to comment
Neville D Posted January 26, 2008 Report Share Posted January 26, 2008 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. Quote Link to comment
Francois Normandin Posted January 26, 2008 Report Share Posted January 26, 2008 Is that what you're trying to achieve? Quote Link to comment
LAVA 1.0 Content Posted January 26, 2008 Report Share Posted January 26, 2008 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). The reference has to be strict to get at the history property. http://forums.ni.com/ni/board/message?board.id=170&message.id=297532#M297532' target="_blank">See this thread on the Dark-Side. That req may have to do with the the data type being numerics or WF data types. Ben Quote Link to comment
Gabi1 Posted January 26, 2008 Author Report Share Posted January 26, 2008 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. Quote Link to comment
Neville D Posted January 26, 2008 Report Share Posted January 26, 2008 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"> 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. Quote Link to comment
Francois Normandin Posted January 26, 2008 Report Share Posted January 26, 2008 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. Quote Link to comment
Gabi1 Posted January 27, 2008 Author Report Share Posted January 27, 2008 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... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.