Hello everyone, as part of a work-study program, I was given the task of programming an Excel code on VBA in order to control and retrieve the measurements of a thermocouple on an Agilent 34970A station.
I would like to know if you could enlighten me on the difficulties I am encountering. Indeed, I have the beginnings of a program that allows me to send SCPI commands to take measurements continuously in a While loop.
The problem I encounter is the following -> I cannot retrieve the measurements one by one in real time to increment them in excel.
I can retrieve all the data at the end of the measurement using the "FETCH?" but that's not what I want. In fact my idea is to then create a dynamic graph on Excel to observe the evolution of the measurements in real time. Finally my question is the following, "Would you know if there is a way to take the measurements and have them sent directly to Excel?"
Here is actually the SCPI Command that i send to the Agilent in order to take the measurements:
agilent.WriteString "CONF:TEMP TCouple,K,(@301)"
agilent.WriteString "ROUT:SCAN (@301)"
agilent.WriteString "TRIG:SOUR TIMER"
agilent.WriteString "TRIG:TIMER 0.5"
agilent.WriteString "TRIG:COUNT 50"
agilent.WriteString "INIT"
I will very much appreciate your help, in the meantime, I wish you a very good day