Hi Rajesh,
Looks like you have a great start there. One thing to keep in mind with translating code is that it will rarely translate one-to-one. Similar to languages: translating directly from one language to another such as English to Spanish or French, the translation will not make sense if it is translated word for word.
That being said, I think the fundamental puzzle piece you are missing is the timing function. To write out all of your digital samples you will want to place a DAQmx Timing.vi before you write your samples with the DAQmx Write.vi. You will see this function in the internally clocked example. I referred to previously.
The second minor change I believe you will want to make is with the polymorphic instance of the DAQmx Write.vi. It looks like you would like to write multiple samples to a single line on the board. For this you will want to click on the text below the vi, and select 1 Channel, N Samples.
If you are still having difficulties, please be specific regarding the problem you are facing (i.e. if you are encountering a specific error, or if the code is acting "this" way, and you expect it to act "that" way).
Regards,
Jennifer O.