LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB Communication Error

All experts,

I have a strange problem. I am using GPIB write to control a attenuator. Sometimes, when I send commands too quickly, GPIB write has error message, and then after that I've got to physically switch off the attenuator in order to communicate with this machine. I have tried GPIB clear and 488.2 device clear. They all don't work.

Could anybody here to help me out please?

Thanx in advance.

All the best,

Liuhongbo
0 Kudos
Message 1 of 10
(3,923 Views)
Hi, maybe you can try this

Problem 1 :
Use a wait for the multiple sending of command in your VI

Problem 2
As for the clearing of the remote status, maybe you can use the GPIB misc icon. All under the GPIB palette.
For the string cmd, you can use "rsc 0" and then write another one "sre 0"

This rsc 0 string is to Release System control
The sre 0 string command is to clear remote enable of the instrument
0 Kudos
Message 2 of 10
(3,914 Views)
Hi, maybe you can try this

Problem 1 :
Possible solution :Use a wait for the multiple sending of command in your VI

Problem 2
As for the clearing of the remote status, maybe you can use the GPIB misc icon. All under the GPIB palette.
For the string cmd, you can use "rsc 0" and then write another one "sre 0"

Possible Solution :
"rsc 0" string is to Release System control
"sre 0" string is to clear remote enable of the instrument
0 Kudos
Message 3 of 10
(3,913 Views)
Dear Regular,

If I am right, GPIB mis requires to be a system controller status when sending command sre 0/1. However sending rsc 0 is to release system control.

Liuhongbo
0 Kudos
Message 4 of 10
(3,902 Views)
Good Day,
Thankz dude, maybe you just have to wait for someone out there who knows more than 😃 If you want to be the system controller just write rsc 1

Cheers
0 Kudos
Message 5 of 10
(3,899 Views)
Liuhongbo,

What is the error message that GPIB write returns? This might give us some idea of what is going wrong.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 6 of 10
(3,876 Views)
Thanx guys,

The error message is GPIB write.vi time out. I have tried to use NI explore to talk to the machine, it doen't seem the communication can go through. I believe if that happens, there is nothing software can do about it. Pls correct me if I am wrong.

Thank all of you guys very very much for trying to help me out. 🙂

Take care,

Liuhongbo
0 Kudos
Message 7 of 10
(3,871 Views)
Liuhongbo,

If a GPIB write times out it means either you are sending a lot of data, and it takes too long to transmit it all, or the GPIB handshake failed/took too long. It sounds like you are experiencing the second case. Your device is probably getting confused when you send it data too quickly, and it messes up the handshake. Once the handshake is messed up you won't be able to send anything else to your device. That is why sending GPIB Clear does not fix the problem. Unfortunately turning your device on and off is probably the only solution.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 8 of 10
(3,847 Views)
Dear All,

The problem is not caused by Labview itself. It is caused by the software coming with the hardware.

Really appreciate for you guys' valuable help and thoughts.

All the best
0 Kudos
Message 9 of 10
(3,821 Views)

sometimes, the length of GPIB cable matters. You can set it in the NI MAX settings. 

0 Kudos
Message 10 of 10
(778 Views)