Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using TNT5002 in embedded instrument and need to sense when the host is attempting to read data from the instrument

I am using the TNT5002 in a measurement device (PowerPC based, no OS used. TNT5002 software is interupt driven) to received commands and reply back to a host. Everything works well but now I need to sense when the Host Controller is attempting to read data ("ibread") after addressing has already been accomplished (Host listener, my device a talker). This is for a special case where the host can request a measurement from the device by simply using "ibread". I cannot look for a transition of my device to a talker since "ibread" does not untalk my device when "ibread" is sent multiple times in a row. I am guessing something can that sense the start of the acceptor handshake is needed. My current solution is to place new measurements as thy are ready into the TNT5002 FIFO if my device is a talker, but this seems like a crude work around, as the device still needs to be able to respond to normal Host commands for information other than these measurements. Please advise.
0 Kudos
Message 1 of 4
(3,344 Views)

MGotcha,

 

I am investigating this.

 

Regards,

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 2 of 4
(3,330 Views)

Hello MGotcha,

 

At first I was trying to think of any other instruments that do this kind of behavior, but I ended up not being able to do this.  Instruments usually respond to queries from the host.  If there is no query, there is no way for the instrument to know how to respond.  The only consession for extra data being sent across the bus (data not attached to a query) is for instruments to signal SRQ when extra data is ready.  You may want to use service requests when extra data is ready on your instrument instead of simply responding when you think that the controller is listening again.

 

If you decide that the behavior you described is correct for your system, I think I know of a way to work it in.  NRFD is the first handshaking line to toggle when a listener is expecting data.  You can check the state of NRFD (to see if there is a listener), check the state of the ATN line (to make sure that command bytes are not getting sent out), and make sure that your instrument is still addressed as talker.

 

I have not fully thought out how this would work if there were multiple instruments on the system, but it is possibly a better work-around than the one you are currently using.

 

I hope this helps,

Steven T.

Message 3 of 4
(3,321 Views)
Thanks Steven.
Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 4 of 4
(3,319 Views)