02-11-2008 05:50 AM
02-11-2008 09:28 AM
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
02-11-2008 10:34 AM
02-11-2008 11:21 AM
Hello FHM!
I will add my complete code. In my test everything works fine!
Option Explicit
Dim StartIndex_Hin, MinWinkel
Dim Channel
Dim StartWinkelHin
Channel = 2
MinWinkel= CCh(Channel,1) ' Search the Minimumvalue in the channel
StartWinkelHin = MinWinkel + 10 ' MinValue + 10
StartIndex_Hin = ChnFind("Ch("&Channel&") > " & str(StartWinkelHin),0) ' finde the value (StartWinkelHin ) in the Channel
MsgBox StartIndex_Hin
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
02-12-2008 05:13 AM
thanks for your reply. You are right it works fine as long you use "Channel=2" if you use "Channel="Test" " it wont work any more. The error tells that ")" is needed.
that was and is still the problem
02-12-2008 06:16 AM
Option Explicit
Dim StartIndex_Hin, MinWinkel
Dim Channel
Dim StartWinkelHin
Channel = "Test"
MinWinkel= CCh(Channel,1) ' Search the Minimumvalue in the channel
StartWinkelHin = MinWinkel + 10 ' MinValue + 10
StartIndex_Hin = ChnFind("Ch("""&Channel&""" ) > " & str(StartWinkelHin),0) ' finde the value (StartWinkelHin ) in the Channel
MsgBox StartIndex_Hin
Call MsgBox("Ch("""&Channel&""" ) > " & str(StartWinkelHin))
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
02-12-2008 06:36 AM
03-07-2011 07:43 PM
I would like to resurect this topic for one clarifiation.Is there a way to call out the GROUP using this method? I'm trying to do a very similar thing, except that I'm searching different channels in different groups.
Thanks in advance.
03-08-2011 05:18 PM
Hi FCW,
Yes, you can add the Group syntax in several ways instead of your current Ch("ChannelName") syntax:
Ch("GroupName/ChannelName")
Ch("GroupName/[ChannelIndex]")
Ch("[GroupIndex]/ChannelName")
Ch("[GroupIndex]/[ChannelIndex]")
Brad Turpin
DIAdem Product Support Engineer
National Instruments