-
RE: Python VISA control of DAQ6510 with 7700 MUX card
What is the easiest way to ensure that the scan is complete prior to reading the buffer?
Thanks! -
RE: Python VISA control of DAQ6510 with 7700 MUX card
Thanks so much for the reply. That was exactly what I needed!
I was just having trouble with the syntax and knowing which commands to issue to extract the buffer data.
--Fred -
Python VISA control of DAQ6510 with 7700 MUX card
I am trying to use my DAQ6510 with 7700 card to do a multichannel scan with Python using TSP. I am able to successfully perform the scan and extract the data using Test Script Builder, but I am having trouble translating the data buffer commands into Python using PyVISA. Below is a snippet of the TSP code in Test Script Builder. I'm not sure how to query the individual readings in the data buffer using Python commands. For example, 'defbuffer1' is not defined. How do I create Python data arrays from the defbuffer1.readings to extract the individual measurements?
-- set up Scan
scan.add("101:119")
scan.scancount = scanCount
-- set up trigger model
trigger.model.initiate()
display.changescreen(display.SCREEN_HOME)
-- print measurement data to console
i = 1
while i <= bufferSize do
delay(2)
lastIndex = defbuffer1.n
printbuffer(i, lastIndex, defbuffer1.readings)
i = lastIndex + 1
end