06-12-2012 10:05 AM
Hi,
I'm using Windows 7. I installed the USB driver provided in this link:http://www.sorensen.com/products/XBT/XBT_Downloads.htm.
In MAX it is listed under Serial&Parallel ASRL5:COM5 In the device manager it is listed under Ports:COM5
I am not sure how to test using VISA interactive control to make sure the connection is established.
Here are the settings:
Serial Settings:
Baud Rate:38400,
Data Bits:8
Stop Bits:1
Parity:None
I'm using the default settings for the other options such as Flow Control: None,Timeout=2000ms etc.
In the view attributes tab:
Attribute:Is port connected
Current Value:Error VISA: (Hex 0xBFFF001D) The specified attribute is not defined or supported by the referenced resource.
I don't know if this is important.
When I write *IDN?\n (Bytes to read:6), I get Return Count:6 bytes
When I click 'Read Status Byte':,I get the following error:
Read STB Operation Error VISA: (Hex 0xBFFF003A) Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state).
If I click 'Query', I get the following error: Read Operation Error VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
I also tried to create USB raw driver using driver wizard of VISA.In that case I kept getting timeout errors:Read Operation Error VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
Can you please tell me what I'm doing wrong?
Thank you.
Solved! Go to Solution.
06-12-2012 10:11 AM
@Sorensen_XBT wrote:
When I write *IDN?\n (Bytes to read:6), I get Return Count:6 bytes
Where did you get the idea the unit only returns 6 bytes in response to a *IDN?\n?
06-12-2012 10:28 AM
Just about everything is wrong. Is Port Connected does not apply to non-NI serial devices. The USB Wizard is completely wrong and you must undo everything you did there. If you managed to get your new driver installed, it rendered the serial interface inoperable. Do not do a read status bytes. After you do a write of *IDN?, you just do a read or do the write/read with the query. The return count bytes of the write is irrelevant. It has nothing at all to do with the number of bytes to read. If you get a timeout, then double check the com settings and the type of serial cable you are using.
Do you get the same error when you try the driver available from that same site?
06-12-2012 10:56 AM
I am using the driver that I downloaded from the Sorensen's website. I tried the USB wizard in another computer just to see if that would make a difference.The errors that i get are with the original usb driver provided by the company.I see the return count in the textbox as in the attached picture.
The port settings are:
Baud Rate:34840
Data bits:8
Parity:NONE
Stop Bits:1
Flow Control:None
Thank you for your help.
06-12-2012 11:29 AM
Who cares about the number of bytes written? And, setting the com port from windows is irrelevant. What matters is how you set the com port in the VI or in MAX.
06-12-2012 11:49 AM
I did not know how to test whether the connection is established or not hence the reason I am asking these questions here.I did not say anything about the importance of number of bytes.Since this the first time I am using VISA, I gave all the information that i see on the program . I will eventually use visual c++ to control the power supply.Before I do that I want to make sure i set up everything properly.
I pugged into another USB port and COM # in Windows and Max are the same.Now it worked.
Thank you for your help.
12-20-2012 04:14 AM
Hello
i have same problem, but you did not tell how you resolved it. Please can you tell me how you have resolved it.
Thank you
12-21-2012 08:33 AM
Did you already check the configuration like end character, bytes to read or write? Did you try using a different USB port?
12-21-2012 09:08 AM
It's been a while but as far as I remember I just removed \n and only sent *IDN?. It automatically adds \n. When you use visa API you need to send *IDN?\n but in VISA interactive control you don't need the end character.