09-22-2019 08:54 AM
Hallo,
I'm using the script below to manage or modify a channel according with the condition, but now I need change a large number of channels according with a condition of one channel.
dim
for a = 1 to chnlength(1)
if chd(a,1) > 20 then
chd(a,2) = nv now, I need modify a lot of channels, like chd(a,2) until chd(a,300)
end if
next
Thanks so much
Solved! Go to Solution.
09-23-2019 04:01 AM
A complete example of how to use a DIAdem Analysis Event Search to "filter" that data can be found on my website at this link: http://www.savvydiademsolutions.com/blog.php?topic=blog-filter-channel-data-by-events Feel free to contact me if you have any further questions.
09-23-2019 09:19 AM
dim a, b
for a = 1 to chnlength(1)
if chd(a,1) > 20 then
for b = 2 To 300
chd(a,b) = nv now, I need modify a lot of channels, like chd(a,2) until chd(a,300)
next
end if
next
09-23-2019 09:11 PM
Thanks very much! Works very well.
Only one question more, how can I delete the lines selected according with the condition?
09-24-2019 08:58 AM
You can call DataBlDel(channnel, startRow, #valuesToDelete)
http://zone.ni.com/reference/en-XX/help/370858N-01/comoff/databldel/
09-25-2019 08:21 AM
The link below shows how to perform an Event Search, and then use a custom dialog (that you can download for free) that will allow you to post-process the Event Search results. You can either set those values to NoValue, or delete those rows.
http://www.savvydiademsolutions.com/analysis.php?topic=postprocess-event-search-results
09-30-2019 01:13 AM - edited 09-30-2019 01:15 AM
Hallo
Sorry for my poor knowledge to scripting..I'm trying to change a channel base on a range of values from the other channel, I've tried a lot of thing, but doesn't work. Could you give me a suggestion?
dim a, b
for a = 1 to chnlength(1)
if chd(a,1) > 20 then (like between 60 until 70),
for b = 2 To 300
chd(a,b) = nv
next
end if
next
Thanks Advanced
09-30-2019 03:01 AM
Hallo,
I'm just got the good results with this script below
for = 1 to chnlength(2)
aux = chd(a,1)
if aux>cuti1 and aux<cutf1 then
for b = x To y
chd(a,b)= nv
chd(a,b)= chd(a,b)
next
end if
next
Thanks Advanced