Reja,
The simplest way to do this would be to combine an AI software-timed read in a loop with a digital software-timed write. Though there would be no absolute timing restrictions, this should be good for a 2 Hz signal. Attached is a very simple example that reads in an analog voltage, compares it to a threshold, then writes the result out to a digital line. Does this work for you? Is this what you intended in your original post?
Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments