Thema: Ivi visa-com

Einzelnen Beitrag anzeigen

Benutzerbild von trojaner
trojaner

Registriert seit: 11. Mai 2004
Ort: Herisau CH
13 Beiträge
 
Delphi 10 Seattle Architect
 
#4

AW: Ivi visa-com

  Alt 30. Nov 2016, 12:41
hallo

CoInitializeEx (NIL, COINIT_APARTMENTTHREADED); // Start COM on this thread
rm := CoResourceManager.Create; // Create the VISA COM I/O Resource manager
rm.Open('TCPIP0::127.0.0.1::INSTR', NO_LOCK, 0, '', sess); // Use the resource manager to create a VISA COM Session
sess.QueryInterface(IID_IMessage, io); // The IVisaSession interface is very general and does not have string reading/writing , we want to be able to read and write to the instrument
io.WriteString('*IDN?', retCount); // Write to the instrument
io.ReadString(1000, readResult); // read the result


Gruss
Peter
  Mit Zitat antworten Zitat