06-30-2010 08:28 AM
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?
06-30-2010 09:15 AM
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'.
07-11-2010 02:47 AM - edited 07-11-2010 02:49 AM
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 #
07-11-2010 08:36 AM
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.
07-11-2010 08:42 AM
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
07-11-2010 08:58 AM
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.
07-11-2010 09:15 AM
checksum was disabled
adam 4015 works on ascii command response protocol but the AA is an address in hex characters
07-11-2010 09:28 AM
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.
07-13-2010 10:28 AM - edited 07-13-2010 10:29 AM
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?
07-13-2010 10:42 AM
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.