Change channel timing in a sequence


Recommended Posts

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")


Link to comment
Share on other sites

A few things: 

1) I forgot to mention that you have to do:


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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.