DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

error when reading a property

Solved!
Go to solution

Hi,

This commands returns an error 'invalid use of null...' most of the time.  Sometimes, it works ok...

msgbox Data.GetChannel("Voltage phase a filt avg").Properties("minimum").Value

 

I don't see what I am doing wrong - any help appreciated.

Diadem 2015, SP2

 

Thanks

Thomas

0 Kudos
Message 1 of 4
(2,530 Views)

The syntax is correct. Does the channel exist, or is there a spelling error with the blanks? Have you tried to use wildcards?

msgbox Data.GetChannel("Voltage*").Properties("minimum").Value 

Have you tried this?

Data.GetChannel("Voltage phase a filt avg").Minimum
0 Kudos
Message 2 of 4
(2,522 Views)

Hi Winner,

 

Thanks for the fast response. Unfortunately, I have no success with your proposals, but I did notice a pattern in the behavior.  The problem arises when I try to access channels which have been created by a script.  If I just click once on the channel name in the data portal, the problem does not appear.  It is as if the channel is not fully recognized until I click on it.....

 

Thomas

0 Kudos
Message 3 of 4
(2,495 Views)
Solution
Accepted by topic author mrme

Hi winner,

I have found a solution.  If I use the ChnCharacter command, then the properties are recalculated and all works ok.

call ChnCharacter("Voltage phase a filt avg")

Thanks for the support!

Thomas

 

 

0 Kudos
Message 4 of 4
(2,491 Views)