LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Wipe

Solved!
Go to solution
Highlighted

Hello,

 

I have a case function containing the bandwidth properties of a water heater temperature, however the conditions for the bandwidth is that all data points must be within 1 degree of the first data point taken. How would I reference the very first data point and then make sure each one after is within a degree of that first temperature reading? Is there a way I can enter a function that will use the first data point every time? And if the data point is out of bandwidth I want to erase only the one data point that is out of band.

 

Thanks

0 Kudos
Message 1 of 6
(288 Views)
Highlighted

Hi Sam,

 


@sambpk wrote:

I have a case function containing the bandwidth properties of a water heater temperature, however the conditions for the bandwidth is that all data points must be within 1 degree of the first data point taken. How would I reference the very first data point…


I guess you can implement this using a shift register in the loop around that case structure!

 


@sambpk wrote:

And if the data point is out of bandwidth I want to erase only the one data point that is out of band.


So when a new data point is read and the check fails ("out of band") then you want to "erase" that sample?

In other words: there is an array of samples and you don't want to append the current sample to this array?

I guess you can use a case structure to implement an IF-THEN-ELSE statement…

(This question shows some lack of "THINK DATAFLOW!" awareness…)

 

I don't see any numeric arrays in your image: where do you store those "in band" samples?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 6
(282 Views)
Highlighted

@GerdW wrote:

Hi Sam,

 


@sambpk wrote:

I have a case function containing the bandwidth properties of a water heater temperature, however the conditions for the bandwidth is that all data points must be within 1 degree of the first data point taken. How would I reference the very first data point…


I guess you can implement this using a shift register in the loop around that case structure!

 

How would I reference only the first point of the data set in the shift register? And if I only want it to affect option of the case structure will this still work?

 

@sambpk wrote:

And if the data point is out of bandwidth I want to erase only the one data point that is out of band.


So when a new data point is read and the check fails ("out of band") then you want to "erase" that sample?

In other words: there is an array of samples and you don't want to append the current sample to this array?

I guess you can use a case structure to implement an IF-THEN-ELSE statement…

(This question shows some lack of "THINK DATAFLOW!" awareness…)

 

I don't see any numeric arrays in your image: where do you store those "in band" samples?

 

I'm a mechanical engineer attempting to learn coding and labview on the job in a short amount of time, so no I am not aware of every detail of coding. This is only a screenshot of a case structure inside a case structure inside a while loop where the samples are written to a spreadsheet as well as a table on the front panel. 

0 Kudos
Message 3 of 6
(271 Views)
Highlighted

Hi Sam,

 


@sambpk wrote:

How would I reference only the first point of the data set in the shift register? And if I only want it to affect option of the case structure will this still work?


You store the first sample in the shift register, but not the following samples. Use a case structure (or Select node) to decide on "First sample?". There has to exist a condition to decide on "first sample of the data set" and you surely know that condition: just implement it to control the case structure…

What do you mean by "affect option of the case structure"?

 


@sambpk wrote:

I guess you can use a case structure to implement an IF-THEN-ELSE statement…

(This question shows some lack of "THINK DATAFLOW!" awareness…)

 

I don't see any numeric arrays in your image: where do you store those "in band" samples?

 

I'm a mechanical engineer attempting to learn coding and labview on the job in a short amount of time, so no I am not aware of every detail of coding. This is only a screenshot of a case structure inside a case structure inside a while loop where the samples are written to a spreadsheet as well as a table on the front panel. 


Providing just screenshots of tiny parts of your code base doesnt help us to really help you!

When you want better/more detailed help you should attach the whole VI (or even better the whole project)!

 

Btw. "IF-THEN-ELSE" is a basic programming construct and not specific to LabVIEW. Programming should always start with sketching an algorithm on a sheet of paper, independently from the used programming language…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 6
(240 Views)
Highlighted

@GerdW wrote:

Hi Sam,

 


@sambpk wrote:

How would I reference only the first point of the data set in the shift register? And if I only want it to affect option of the case structure will this still work?


You store the first sample in the shift register, but not the following samples. Use a case structure (or Select node) to decide on "First sample?". There has to exist a condition to decide on "first sample of the data set" and you surely know that condition: just implement it to control the case structure…

What do you mean by "affect option of the case structure"?

 


@sambpk wrote:

I guess you can use a case structure to implement an IF-THEN-ELSE statement…

(This question shows some lack of "THINK DATAFLOW!" awareness…)

 

I don't see any numeric arrays in your image: where do you store those "in band" samples?

 

I'm a mechanical engineer attempting to learn coding and labview on the job in a short amount of time, so no I am not aware of every detail of coding. This is only a screenshot of a case structure inside a case structure inside a while loop where the samples are written to a spreadsheet as well as a table on the front panel. 


Providing just screenshots of tiny parts of your code base doesnt help us to really help you!

When you want better/more detailed help you should attach the whole VI (or even better the whole project)!

 

Btw. "IF-THEN-ELSE" is a basic programming construct and not specific to LabVIEW. Programming should always start with sketching an algorithm on a sheet of paper, independently from the used programming language…


It's quite difficult to type exactly what I mean.. So here's what I'm trying to achieve:

IF Inlet Temperature is greater than 1 degree plus first sample value or less than first sample value minus 1 degree THEN delete data line ELSE record data.

 

What I am unsure of is how to reference the first data point in the inlet temperature and I am also doing the same function for the outlet temperature. The data wipe sub vi inside the case function is being used to wipe the data line if the data is out of band.

0 Kudos
Message 5 of 6
(228 Views)
Highlighted
Solution
Accepted by topic author sambpk

Hi Sam,

 


@sambpk wrote:

It's quite difficult to type exactly what I mean.. So here's what I'm trying to achieve:

IF Inlet Temperature is greater than 1 degree plus first sample value or less than first sample value minus 1 degree THEN delete data line ELSE record data.

 

What I am unsure of is how to reference the first data point in the inlet temperature and I am also doing the same function for the outlet temperature. The data wipe sub vi inside the case function is being used to wipe the data line if the data is out of band.


Like this:

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 6 of 6
(219 Views)