kedi Posted August 1, 2021 Share Posted August 1, 2021 Is there a way to change all or some channel sample timings from within a sequence? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted August 2, 2021 Share Posted August 2, 2021 Sure, it is just: channel.myChannel.timing = 5 (for example, to set myChannel's timing to 5) You can use channel.listAll() to get a list of channels (optionally for just one group) and then use the above with execute() to do a group of channels: private string clist = channel.listAll("myGroup") for (private i = 0, i < numrows(clist), i++) execute("channel." + clist + ".timing = 5") endfor Quote Link to comment Share on other sites More sharing options...
kedi Posted August 6, 2021 Author Share Posted August 6, 2021 Not working. I have channel in main group named a1 and channel in group T1, named t1. channel.a1.timing = 0 Does not change the timing. Nor does channel.t1.timing = 0. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted August 6, 2021 Share Posted August 6, 2021 A few things: 1) I forgot to mention that you have to do: channel.restart() after changing the timings to get DAQFactory to apply them. This is for efficiency and to tell DAQFactory you are done tweaking the timing. The timing will appear updated in the channel, but until you do restart() it won't actually apply those changes. 2) note that changing the timing in script won't update the channel table or channel views if they are visible at the time you run the sequence. 3) it looks like in my haste, I forgot to put after clist in my sample script. I've updated that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.