Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I monitor Status word From the other side of the GPIB bus

I develop Thermal system control that should be operate thru the GPIB IEE 488.2 bus , my instrument application already written in Visual Basic ,The system knowes to do basic operation such as SETPOINT ,AIRDUT , BEGIN , STOP and more but I have do a problem , any time that I capture command from the controller the status word stuck at listener mode and I can not send another command again because my loop is waiting for the other side (the controller ) to tallk by monitor the IBSTA word .
There is anyway to reset ,clear ,initialize STATUS word again to his default value ?
Note : I am using VB 6 , the Samples that you have here for Non-controller is good so far if I want to send and recive data manualy (c
omputer to computer)
What if I have A system that work and always waiting for capture command and do somthing ?
I will be very greatful if anyone can help me , send me sample code for Status checking loop.

MIKI-AVI
0 Kudos
Message 1 of 4
(3,841 Views)
Hello Miki-Avi,

I'm having a little bit of trouble understanding what you're trying to do. It seems that you have an instrument application that you have written and works in some instances but gets into an infinite loop in other cases. I think that your loop is waiting for something in the Status byte to change, and you're wondering how you can get it to change.

I'm not sure what bit you're waiting for, but I would assume that it is the LACS bit 2. You do not want to simply reset the IBSTA byte because this byte tells you what is happening on the GPIB interface. So, if you're waiting for the LACS bit to change, then you are waiting for the board to be addressed as a listener. Your controller would address the non-controller as a listener once you sent it da
ta with an IBDEV and an IBWRT call.

If you are looking for code for a status checking loop, check the following resources. Remember that you must call ibwait 0 to update your IBSTA byte. The 488.2 Function Reference is very useful in figuring out what you need to do.

http://venus.ni.com/stage/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3EF8D56A4E034080020E74861&p_node=DZ52353&p_submitted=N&p_rank=&p_answer=&p_source=Internal

http://ae.natinst.com/operations/ae/public.nsf/fca7838c4500dc10862567a100753500/9cc0939663f1c5de862565d70082e89e?OpenDocument

Please let me know if you need more assistance.

Scott B.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(3,841 Views)
Both of those links are inaccessible from outside of NI.
0 Kudos
Message 3 of 4
(3,841 Views)
You are right. Sorry about that! The corrected links:

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3EF8D56A4E034080020E74861&p_node=DZ52353&p_source=External

http://digital.ni.com/public.nsf/websearch/9CC0939663F1C5DE862565D70082E89E?OpenDocument

Scott B.
National Instruments
Applications Engineering
0 Kudos
Message 4 of 4
(3,841 Views)