Hello..
I have a situation where I want to set the interface board into a Listen-Only mode by using the ibconfig routine. I want to 'know' when data was being received from a 'Talker' so that I could alert the user that a data transfer was taking place. When you set the interface board to 'Listen-Only' the LACS bit in the ibsta variable is always set. Normally, if the board was configured to operate in the usual addressing manner, I would monitor this bit periodically to dermine if the board had been addressed by a talker.
My method regarding the timeout, was to setup a timer interrupt which would fire about every 250 mSec. The interrupt routine would set the TMO value to about 20 mSec, then attempt to read data using ibrd or ibrda. If the ibrd function returned a TMO condition and the ibcnt variable was > 0, then I knew that a data transfer was in progress. I would then reset the TMO to something much greater, alert the user to data being transmitted, then finish the data transfer by calling ibrd again. This is why I was concerned that the TMO condition would cause the possible loss of a data byte. This sounds a bit convoluted and if you have another method, I would appreciate your help.
Using the NI-Device will not be feasible for me.
My desire is to have the card configured as a 'device' using my software. I didn't want the user to have to use the NI-MAX tool to set the card to a 'non-controller' configuration. Therefore, is it possible to dynamically set the interface card to a non-controller configuration? The only way that I know how to do this is from the configuration tool. I would have thought that there would be a NI488 board function that would do this, but I could not find one.
In summary, I want to:
1) Dynamically set the board to non-controller
2) Set the board to 'listen-only' [no addressing]
3) Start an asynch read (ibrda)
4) go off and do other 'cool' things
5) Every 250mSec, determine if a data transfer is
taking place and alert the operator.
6) Process the data collected once the ibrda END
has completed.
Anyway, I hope that my explanation is sufficient for you to provide some help. Thanks for any advise that you may offer..
Jim