Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

tnt4882 instability

I set  TNT4882 in one-chip mode,and it works when  useing  MAX,
PC procedure use VIVA read and write VI in LabView,
if intervals between write and read is less than 5ms ,it is OK,
when it is longer ,an Timeout error occured.what is the reason??
thanks for your help!

this  is the code in TNT4882:
// init_TNT4882( )
      CMDR=0x22;                 //reset 4882
      // Place the TNT4882 in Turbo+7210 Mode
      SPMR=0x80;//Write 80 (hex) to offset 6.
      AUXMR=0x80;//Write 80 (hex) to offset A (hex).
      delay();
      SPMR=0x99;//Write 99 (hex) to offset 6.
      AUXMR=0x99;//Write 99 (hex) to offset A (hex).
      delay();
  
      HSSEL=0x10;             //Configure the TNT4882 for 7210 mode
      
      AUXMR=0x02;             //Make Sure that the Local Power-On Message is Asserted
     delay();
   
      //Configure the TNT4882 for GPIB Operation
      ADMR =0x31;              //Set dual primary addressing mode
      ADR=Addr;                 //Load the primary GPIB address
      ADR=0xE0;              //no secondary address,
      KEYREG=0;
      SPMR =0x17;  //Write the Initial Serial Poll Response
     
   
     AUXMR=0x09;
     delay();           
     PPR=0x6a;
     delay();                  //Configure the Initial Parallel Response
     IMR0 =0xA8;      
     IMR1 =0x94;       
     IMR2 =0x01;        
     IMR3 =0x02;
     AUXMR=0x00;   
///SetGPIBWrite( ) 
     CMDR =0x08;        //TNT4882  stop
     CMDR =0x10;        //reset fifo
     CFG  =0x00;          //set GPIB write
     AUXMR=0x9D;    
     delay();
     EOSR=0x3B;       //end byte
     CNT0 =(char)(cnt);          
     CNT1 =(char)(cnt>>8);


///host  procedure  flow
after reset ,TNT4882 as a  listener,when it received data from PC,
it would be seted as a talker, at the same time,host send data to FIFOS in TNT4882.

///PC  procedure  flow
ibwrite(***)
delay(10ms)
ibread()
  
   

0 Kudos
Message 1 of 4
(3,533 Views)

I set  TNT4882 in one-chip mode,and it works when  useing  MAX,
PC procedure use VIVA read and write VI in LabView,
if intervals between write and read is less than 5ms ,it is OK,
when it is longer ,an Timeout error occured.what is the reason??
thanks for your help!

this  is the code in TNT4882:
// init_TNT4882( )
      CMDR=0x22;                 //reset 4882
      // Place the TNT4882 in Turbo+7210 Mode
      SPMR=0x80;//Write 80 (hex) to offset 6.
      AUXMR=0x80;//Write 80 (hex) to offset A (hex).
      delay();
      SPMR=0x99;//Write 99 (hex) to offset 6.
      AUXMR=0x99;//Write 99 (hex) to offset A (hex).
      delay();
 
      HSSEL=0x11;             //Configure the TNT4882 one chip
      
      AUXMR=0x02;             //Make Sure that the Local Power-On Message is Asserted
     delay();
   
      //Configure the TNT4882 for GPIB Operation
      ADMR =0x31;              //Set dual primary addressing mode
      ADR=Addr;                 //Load the primary GPIB address
      ADR=0xE0;              //no secondary address,
      KEYREG=0;
      SPMR =0x17;  //Write the Initial Serial Poll Response
     
   
     AUXMR=0x09;
     delay();           
     PPR=0x6a;
     delay();                  //Configure the Initial Parallel Response
     IMR0 =0xA8;      
     IMR1 =0x94;       
     IMR2 =0x01;        
     IMR3 =0x02;
     AUXMR=0x00;   
///SetGPIBWrite( )
     CMDR =0x08;        //TNT4882  stop
     CMDR =0x10;        //reset fifo
     CFG  =0x00;          //set GPIB write
     AUXMR=0x9D;    
     delay();
     EOSR=0x3B;       //end byte
     CNT0 =(char)(cnt);          
     CNT1 =(char)(cnt>>8);


///host  procedure  flow
after reset ,TNT4882 as a  listener,when it received data from PC,
it would be seted as a talker, at the same time,host send data to FIFOS in TNT4882.

///PC  procedure  flow
ibwrite(***)
delay(10ms)
ibread()
0 Kudos
Message 2 of 4
(3,525 Views)
Hello bhc1983,
 
It looks like you are doing something with different components mixed in. Are you creating your own driver for your TNT4882 chip using VISA?  If you are creating your own driver in VISA how can you see the interface in MAX (Measurement and Automation Exploreer)?
 
Please give me some more details about your whole system setup.  Its difficult to interpret what is happening from the limited information.
 
Thanks,
Steven T.  
0 Kudos
Message 3 of 4
(3,478 Views)
Hello Steven T.
thanks for your help.
I borrowed  "GPIB-USB-HS" module made by NI company,and It connectd my PC and my GPIB equipment.My GPIB equipment use TNT4882 chip for communication.and I named my
GPIB equipment  for the host equipment in my paper.

I can use MAX for test,but MAX is only for debug.
so I use VISA VI in my own PC procedure.
I use VISA write and VISA
read VI in my procedure,and I insert a delay between  these  two  command.
if the delay time  is  less  than  10ms ,
communication is OK!
but the delaytime is more than 10ms, an timeout error occurs.

my TNT4882 procedure flow as follow : 
///host  procedur  flow
after reset ,TNT4882 as a  listener,when it received data from PC,
TNT4882 would soon be configured  as a talker, at the same time,host send data to FIFOS in TNT4882.


I bebug it for several days, and I found that when the error occured ,TNT4882  became talker
first and then the "GPIB-USB-HS" module  became listener. So I think it is the problem of order.

after I found it is the order problem,I try to wait 100ms before 
TNT4882 is configured  as a talker,now the TNT4882 procedure flow is:
after reset ,TNT4882 as a  listener,when it received data from PC,
wait 100ms,
TNT4882 is  configured  as a talker, at the same time,host send data to FIFOS in TNT4882.
now the delaytime between VISA write and VISA read can be up to 100ms.
but if the delaytime is more than 100ms ,the
communication is not OK all the same.


I don't know what is the problem? Is it  the order problem?or has something else?
and when can I configure TNT4882 as a talker?
 

Thanks,
BHC1983
0 Kudos
Message 4 of 4
(3,472 Views)