Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting return status BFFF003B while writing using VISA test panel

Hello,

 

hey guys I am a novice and just started trying to use labview using its manuals. Till now it was working fine but now I am facing this problem.

 

I am trying to acquire temperature data using an ADAM-4015 card. It is an asynchronous message based communication device working on ASCII command response protocol. Whenever I execute a command in VISA test panel, the return status is always xBFFF003B.

 

Maybe I am doing a mistake in the command itself. The command for the card starts with a delimiting character, then some hexadecimal values ending with a carriage return termination character (\r or 0Dh). One example command according to the card's manual is $ 00 01 05 06 00 (cr) without these spaces and brackets.

cr here denotes carriage return

So how can I send a hexadecimal command in ASCII format from visa test panel?

 

 

 

0 Kudos
Message 1 of 10
(5,921 Views)

I don't believe you can. You can modify one of the LabVIEW examples easily enough, though. Just right click on the string control and select 'Hex Display'.

 

 

0 Kudos
Message 2 of 10
(5,912 Views)

hey dennis thanks for your help but i am still not able to interface ADAM-4015 with labview i used hex display mode in string that i was writing but then reading the response for the command using VISA Read i am getting an error code of 3fff0006 i am attaching the file which is one of the examples files of labview itself which i am using the command which i am sending is # 04 where # is a delimiter character & 04 is hexadecimal address actually what i am sending is 23 04 where 23 is hexadecimal code for #

0 Kudos
Message 3 of 10
(5,845 Views)

That's a warning and one you will get everytime when a termination character is not detected. When there are 0 bytes to be read, you will get the warning as well. If you get no response, your command is incorrect, the com settings are wrong, or you are using the wrong type of serial cable. Since you have not attached the manual, I can't tell if the command is incorrect.

0 Kudos
Message 4 of 10
(5,833 Views)

i think the command is valid but please check if you can 

i have attached the manual

the command i am talking about is #AA on page 13 of the pdf

 

also the fault can't be anything related to hardware because the card can be successfully configured & interfaced by using ADAM Utility software

specifically meant for ADAM daq cards

0 Kudos
Message 5 of 10
(5,830 Views)

Are you sure you have to send it in hex? It says AA is two characters - not one byte. Also check if checksum is enabled.

 

You might want to capture the data sent by the Adam software. Portmon from Microsoft is a good tool for this.

0 Kudos
Message 6 of 10
(5,823 Views)

checksum was disabled

adam 4015 works on ascii command response protocol but the AA is an address in hex characters

0 Kudos
Message 7 of 10
(5,818 Views)

But there is a big difference in using hex characters in ASCII mode and hex representation like you are doing. I can send the ASCII characters 'AA' (2 bytes) or a single 'AA' byte. Try it the other way.

0 Kudos
Message 8 of 10
(5,813 Views)

hey dennis your idea of using Portmon was great. The problem was never about the string format. I had to just write the command in Normal way in string control as $042.  But I am still stuck. Still getting 3fff0006 in error out of VISA Read. I am attaching 2 log files of port monitoring by Portmon : One captures the port activity while ADAM Utility is running while other during Labview basic serial read & write run. If you can please spare some time looking at them, i would be very grateful. Maybe they can provide some info about the actual problem.

One thing that i noticed that various Timeout values are differently set : RI, RC, RM, WC, WM are all set to 80 while ADAM Utility is running but RI = -1, RM =0, RC =0, WC=0, WM=500 when labview is running. Also XonLimit:2048 XoffLimit:512 during ADAM Utility run while XonLimit:64 XoffLimit:64 while labview run. Can these different values be causing the problem.

Also in labview.txt after writing $042. there is no operation for READ. Is there any fault in the VI?

 

Download All
0 Kudos
Message 9 of 10
(5,765 Views)

Changing to normal display is a format change and is what I was talking about trying,

 

Now you are not sending the required CR. You can go and change the string control to '\' Codes Display so that you can place a \r at the end or use a concantanate string function with a CR constant.

 

Unless you are using handshaking, I don't believe any of those timeout values pertain.

 

If there are 0 bytes available, then the VISA Read does not run because you have specified 0 bytes.

 

I've already explained the warning.

0 Kudos
Message 10 of 10
(5,756 Views)