Hi Dasheng,
There are 3 separate ways to generate a square wave using your M series card.
Good: Digital Output
Better: Analog Output
Best: Counter Output
There are some great examples for generating a square wave in the LabVIEW Example Finder. A good Analog Output example is located in:
Help>>Find Examples>>Hardware Input and Output>>DAQmx>>Analog Generation>>Voltage>>"Cont Gen Voltage Wfm Int Clk."
A good Counter Output example is located in:
Help>>Find Examples>>Hardware Input and Output>>DAQmx>>Generating Digital Pulses. I recommend taking a look at "Generate Dig Pulse Train-Continuous.vi."
Regards,
Hal L.