hi, my mother languaje is spanish and i'm very confused
the user dialog box what it should be doing is that i could choose from two chn combo boxes 2 angles data from which i want to calculate the difference.
tl:dr i want to select 2 angles and Call Calculate("Ch(""ANS"") = (Ch(""L1(1,1))"") -(Ch(""L1(1,2)""))
this is by far my script in the user dialog box
'advierte de cambio de variable En ANGLE1
Sub ChnComboBox1_EventChange(ByRef This) 'Created Event Handler
Call MsgBoxDisp("Selected channel: " & ChnComboBox1.Text)
'advierte de cambio de variable En ANGLE2
Sub ChnComboBox2_EventChange(ByRef This) 'Created Event Handler
Call MsgBoxDisp("Selected channel: " & ChnComboBox2.Text)
Sub Button1_EventClick(ByRef This) 'Created Event Handler
Call Calculate("Ch(""Result5"") = (Ch(""L1(1,1))"") -(Ch(""L1(1,2)""))
had a lot of trouble with examples please help any advice will suffice
Solved! Go to Solution.
As long as you have a reasonably new DIAdem version, you should be able to use the built-in subtraction function from the ANALYSIS panel instead of the channel calculator, like this:
Call ChnSub(ChnComboBox1.Text, ChnComboBox2.Text, "Result5")
DIAdem Product Support Engineer
what will be the result channel's frequency after subtraction, if both parameter channels have different sampling rate?
Most ANALYSIS functions in DIAdem that use multiple input channels assume that the channels are the same length and run the calculation row-by-row across the input channels. So you'd need to row-align the channels you want to subtract first before running the subtraction calculation. In all versions of DIAdem you can use the ANALYSIS function "Linear Mapping", and in newer DIAdem versions there is a "Resampling" function you could also use.
Senior Technical Support Engineer