Nothing wrong with your wiring, but see point B below.
A/ The recorded ECG data do not show the periodic peaks that are displayed on your front panel. Instead, there is a single large peak toward the record end, exceeding the maximal value returned by the DAQ card. The noise amplitude is also much higher than on the front panel.
Could you send me a better file record ?
B/ What you are doing is :
1/ launch an acquisition with the "adaq acquire wave forms" (means wait for 1300 samples to be acquired, at 440 Hz = 2.954 s)
2/ process the data : plot, build data string, add FAKED time info (process time, not acquisition time, should be out of the For loop (same for the marker control)), save to disk
3/ return to step 1
Of course, step 2 takes some time (variable, depending on system/disk performance). I did some timing on my PC (resonably fast), and I have a 0.1 s delay. Not sure if this is critical for your work, but what you should do is to run TWO separate loops : one for data acquisition, with a continuous acquire waveform and one for data processing and disk recording.
CC
Chilly Charly (aka CC)