Turn Channels off in code

Recommended Posts


Is there any way to turn channels off in code.

My problem is that I have 6 tanks talking via a Modbus gateway. If any of the tanks are turned off Daqfactory gets erros because nothing responds so I thought about when the application starts I would put up a startup screen with radio buttons where the users chooses what tanks are on and when that is closed the non operative tank channels are switched off from the data acquisition.



Link to comment
Share on other sites

Well, you can do it by changing the channel timing to 0 then doing Channel.restart():

MyChannel.Timing = 0

MyOtherChannel.Timing = 0


but, you are probably better off doing the queries in a sequence and then stuffing the data into the channels using AddValue(). This is described a bit in the help under Modbus. This way you get total control over the queries and can do better handling than you could just using channel timing.

Link to comment
Share on other sites


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