Creating V Channels via sequence

Recommended Posts

How can this be done, I'm trying but getting some errors.

I would like to create some V channels and pass to then the data from a QueryToClass function, and then save then to a .xls file using the logging sets.

I've tried like this:

result = db.QueryToClass(handle,sqlscript)	  
V.Channel.Add(chanprefixes[i]+curnet+"_"+device... ) //not sure what to write here since it's a virtual channel

Link to comment
Share on other sites

That is correct:"abc")

Just remember that when you add channels from a sequence they don't cause the workspace to refresh so they won't show up in the workspace until you manually add a channel. They still exist, they just don't show up in the workspace. The reason for this is performance related. It is assumed that you might be adding a lot of channels dynamically and refreshing the workspace each time is quite slow.

That all said, I don't know why you don't just use variables, or better yet, just reference the result class directly. You can't use a logging set because they only work with normal channels, and an export set can reference anything, including a member variable of a class, provided result is global.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.