LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

viOpen communication channel with virtual/simulated instrument just to capture GPIB commands

Hello,

 

I had (and no longer have) access to a Keysight B1500A instrument that I used to send GPIB commands to with a C++ program with visa.h and I was wondering if there was a way to open a communication channel with a simulated instrument.

 

I think it is possible with NI MAX as this page shows https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000004B7aSAE&l=en-CHNI but I'm not sure what changes I should make in my code. Currently I have a piece of code like this: 

 

ViSession defaultRM, instr; /* Communication channels *
string name;
ViStatus status;
name = "GPIB0::22::INSTR";//22 is the address set in the B1500A
status = viOpenDefaultRM(&defaultRM);
cout << "Instrument name: "<<name<<endl;
status = viOpen(defaultRM, (char*)name.c_str(), VI_NULL, VI_NULL, &instr); //opens communictaion channel with divice
status = viSetAttribute(instr, VI_ATTR_TMO_VALUE, 5000);  

 

Thanks for the advice 

0 Kudos
Message 1 of 1
(2,075 Views)