Channel Test Data


tlemar

Recommended Posts

Is there anyway to configure the response ranges of the data that comes back from the test channel settings. It appears to be a sin wave between 1 and -1. I would like to be able to set it to simulate the response I will see from my device.

thanks

Tracy

Link to comment
Share on other sites

There are two ways:

1) you could use a conversion to convert the sin wave into something else. For example:

Value + 1 / 2

will make the sin wave go from 0 to 1 instead of -1 to 1. You can also just not use Value and use systime() or something to create a function based on time. Note that the sine wave period is proprotional to the test channel's Channel #.

2) Set the timing of the test channel to 0, then create a little sequence that has your simulation and use the MyChannel.AddValue() function to stuff data into the channel. You can see this method in action in the AshlandWater.ctl (muniple water) sample included with DAQFactory. This sample can run with either simulated or real data and does it using two different sequences. One generates simulated data, the other takes the real data. In both cases, the data is then stuffed into the channels using Addvalue() instead of using the regular Timing loops of the channels.

Link to comment
Share on other sites

Archived

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