LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't find reason for GBIP error.

Hej to all labview users and proffesionals!
 
Im trying to make some serial communication with a slave (HW).
 
In my test VI i don't get any GPIB ERROR, but in my program i get an GPIB Error?
How come?? any suggestions will be staret well.
You sertianly cannot try the program coz, u dont got the slave, But The attached VI (Serial comm test.VI ) is working just fine,
 
The other VI, (SUBSetCMD ) just writes command to Serial port. But in the big  Main VI (The attached Picture ) The SUBSetCMD.VI  gives GPIB Error .
I cant see why.
 
Hassan Zamzam
 
 
HFZ
Download All
0 Kudos
Message 1 of 8
(3,160 Views)
I couldn't follow your screenshot because I got lost in the circle of arrows. Smiley Sad I also couldn't figure out why you're opening two VISA sessions, but only using 1.

What's the error code that you're getting? Are you getting some sort of dialog because you're using the Simple or General Error Handler? Do you have an "error out" cluster indicator? Does it show the status LED as on?
Message 2 of 8
(3,143 Views)
What do you mean by GPIB error? Every error has a source message and a code. Provide the code. Also, many of the old error codes provide multple possible reasons for an error.If you get one of these, don't just focus on the possible reason that is listed last and not look at the other possibilities.
Message 3 of 8
(3,141 Views)

Sorry for all these circles in The Main picture, but i thought that it will be easyer to understand.

I couldn't get hall the picture of the Circuit so i took two shots.the second is that in green, and the arrows and circles ar just showing the

combination of these two screenshot.

The problem is, that I dont get any error code for that GPIB Error, The error handler or dialog, writes that there are timeout problems.

The two Visa sessions are one for the write and one for the read. But i dont need the other... But i didn't deleted it.

I thought meaby you could see the problem by just looking at the wire  connections to the Write VI.

Before the SubSetCMD.VI, there is a VI that writes and recieves to the serial port, and no problem occurs there.

Meaby the problem are there, should I meaby clear buffer or flush buffer or do any of that before writing again?

I'll try to find the error code ...

H.zamzam

HFZ
0 Kudos
Message 4 of 8
(3,128 Views)
If you get no error code, explain then why you think it's a GPIB error. The picture with some arrows and a vague description of a problem is really not enough to help.
0 Kudos
Message 5 of 8
(3,116 Views)

Hi to all labview Programmers, hopefully nice day...

Here i got the warnigs by jpg screen shot.

Before the VI SUBSetCMD.VI , there was no error .!

Zamzam

 

HFZ
0 Kudos
Message 6 of 8
(3,082 Views)

@HFZ wrote:

Before the VI SUBSetCMD.VI , there was no error .!


And there's no error after it, either. That is a warning, not an error. If the status Boolean is not set then it's not an error. You keep thinking it's GPIB. As Dennis pointed out, an error code can have more than one meaning. Just because one of the possibilities says GPIB doesn't mean that's what it is in your case. It's hard to tell from the screenshot, but it almost looks like the VISA resource control doesn't have anything in it. However, if that were the case, you should have gotten an actual error.
0 Kudos
Message 7 of 8
(3,074 Views)
I think that i mensioned that the error sequence Gave 'OK'  because thats only a warning.
But it gives me problem anyway,. The code in hex, that i write to the Slave makes the slave start a data sequence stream wich then i must read and plot.
In my test VI i dont have any problems with that, I dont eaven get a warning,  The Hex code tells the slave to stream data, and The Slave streams the data with no problem.
I also used the same  SUBSetCMD VI in my testVI and it works very well with no warnings.
 
But when place it in the MainVI i get this Warning. I think the Hex Code is sent to the SLave when doing it in the Main VI,  But no data stream is started, and a warning is there again.
 
When I send the Hex code, I also read the Return Count from the Visa Write and it shows  5 bytes,  But my string is  9  bytes (070E 0546 0000 1F40 56). So the problem meaby lies here. What Can i do with such  a problem??
Zamzam
 
HFZ
0 Kudos
Message 8 of 8
(3,061 Views)