DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

use cmax to update chn prop in Diadem 9.1

Hello Group

 

I have found cmax(chnno) only update the chn property of minimum, and cmin does the same thing of update the minimum. I'm not sure if this only applies to me or anyone else out here. Could anyone please conform this?

 

 

I've also tried to use ChnPropSet(2,"minimum",5) , it came with an errror of "error from diadem kernel, .......Unable to write attribute value ....error number:-212"

 

 

Thanks in advance

 

 

Steven

 

0 Kudos
Message 1 of 13
(5,756 Views)

Hello Steven,

 

CMax( ) and CMin( ) are functions that return the maximum and minimum values respectively of data already in the designated channel.  They do not update anything about the channel.  Are you looking for a function to impose contraints on data within a channel?

0 Kudos
Message 2 of 13
(5,736 Views)

HI There,

 

Here is the description of cmax from diadem help file 

Variable: ChnValMax

Valid names: ChnValMax, CMax

Specifies the maximum value in a channel.

 

These functions can be used as return type as you said in privious reply

or

they could be also used as to update chn's property of 'maximum' eg

 

cmax(chnno) = double

 

What i was looking for is , cmax only updates the channel properties of minimum not the maximum.

 

 

 

0 Kudos
Message 3 of 13
(5,733 Views)

Hey Steven,

 

I am aware of this help documentation, and I think the confusion centers around the use of the word specifies.  I believe that the documentation means that the function specifies to you what the maximum value is rather than you specifying to it what that value should be.  That is, the function returns the maximum value in the channel.  However, if you are saying that it returns the minimum value in version 9.1, that is something I can look into.  In version 11, both CMax( ) and CMin( ) function correctly.  Would you like me to see if this is still the case on my end for version 9.1?

0 Kudos
Message 4 of 13
(5,730 Views)

Hi

 

I have attached 2 gif files.

 

gif1 shows channel property with correct chn max & min,

 

gif2 shows after running the command of cmax(2)=200 , it only updates the channel property of minimum so does cmin.

 

I would like to know could I fix this problem?

 

Thanks

 

Steven

Download All
0 Kudos
Message 5 of 13
(5,729 Views)

Matt 

 

That would be greatttt if you could please have look in DIAdem 9.10.2936

 

Thanks

 

 

Steven

0 Kudos
Message 6 of 13
(5,727 Views)

Hi Steve,

 

The CMax() and CMin() functions return the channel's currently stored maximum and minum value, respectively.  The do NOT set these values.  DIAdem will not let you set the minimum and maximum value, because it uses these to automatically scale the Y axis when the channel is plotted in VIEW or REPORT.

 

You can force DIAdem to recalculate the minimum, maximum, novaluekey, and monotony properties with the following commands

ChnCharacter()

ChnCharacterAll()

 

Brad Turpin
DIAdem Product Suppot Engineer

National Instruments

0 Kudos
Message 7 of 13
(5,718 Views)

Hi Brad,

 

My question was, Assign any integers to cmax it updates the value of 'minimum'  rather than 'maximum' under channels properties.  How could I fix this problem?

 

Maybe cmax is only used as a return chn maximum from your point of view, but we've been using cmax to set channels maximum manually since in DIAdem8 and IT ALWAYS worked.

 

It's very clear this is a bug in diadem9 and we'd like to know how can we fix it?

 

 

Regards

 

 

Steven

 

 

0 Kudos
Message 8 of 13
(5,678 Views)

Hello

 

are there any solutions to this yet? its a bug

 

 

Thanks

 

Steven

0 Kudos
Message 9 of 13
(5,623 Views)

Steven,

 

In DIAdem 8 the CMax() and CMin() functions could be used to set the maximum and minimum values. To do this was a (sort of) hack since these values were suppose to be read-only values. We determined that the implementation to be incorrect behavior. This behavior was corrected in DIAdem 9.1 and is why your old code worked fine in version 8 but now it doesn't in 9.1. To clarify, the bug was in the older version and not in the current version.

 

Regards,

 

Steven Zittrower

Applications Engineer

National Instruments

http://www.ni.com/support

0 Kudos
Message 10 of 13
(5,601 Views)