@@ -39,7 +39,7 @@ def ping(self):
39
39
return False
40
40
return True
41
41
42
- def load_sample_values (self , values ):
42
+ def load_sample_values (self , sampling_freq , values ):
43
43
"""Load sample values into PXI 6733 device.
44
44
45
45
This loads sample values into the PXI 6733 device and then
@@ -49,14 +49,16 @@ def load_sample_values(self, values):
49
49
A callback is registered to clear the task (deallocate resources)
50
50
when the task has completed.
51
51
52
+ :param sampling_freq: The sampling frequency in samples per second.
52
53
:param values: A numpy array of sample values to load in the device.
53
54
"""
54
55
55
56
t = self .daq .Task ()
56
57
t .CreateAOVoltageChan (self .device + b"/" + self .analog_output , b"" ,
57
58
min (values ), max (values ),
58
59
self .daq .DAQmx_Val_Volts , None )
59
- t .CfgSampClkTiming (self .clock , 1000.0 , self .daq .DAQmx_Val_Rising ,
60
+ t .CfgSampClkTiming (self .clock , sampling_freq ,
61
+ self .daq .DAQmx_Val_Rising ,
60
62
self .daq .DAQmx_Val_FiniteSamps , len (values ))
61
63
num_samps_written = self .daq .int32 ()
62
64
values = np .require (values , dtype = float ,
0 commit comments