Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect hamamatsu c9525 to labview via USB port/communication error

Hello to everyone!

 

This was my first attempt at connecting an external device to LabView: I watched a tutorial and tried to follow.

 

I tried to connect the Hamamatsu C9525 HV source to a laptop (Windows7, 32b) using the usb port.

First I tried to install the provided software, written in VB6, and it did not work: I had to download from the internet two .ocx files:

sysinfo.ocx and mscomm32.ocx. After that it worked.

 

Then I tried to set up NI MAX in order to establish communication between LabView and Hamamatsu :

 serial&parallel/COM3

The driver for the USB Serial port (COM3) had already been successfully installed by Windows

when I was trying to configure it in ni-max.

Having completed the ni-max dialogue I opened an axample in labview: Hamamatsu C9525 output DC volts.vi

From VISA resource name I selected COM3_hamamatsuHV as I had named it and an error appeared :

error- 1073807246 occured at visa open... Possible reason: Hex 0xBFFF0072 The resource is valid but visa cannot currently access it.

Went back to NI-max ,selected port, port settings, Validate => Could not open a visa session to "ASRL3::INSTR".visa error code 0xBFFF0072 .The resource is valid but visa cannot currently access it.

On the test panel: is port connected/ error: hex: 0xbfff001d The specified attribute is not defined or supported by the referenced resource.

 

I looked around the forum for these problems, disabled the  "turn off device" from "power management " and the rest but it did not work.

Right now nothing works on that port: not even the originally working Hamamatsu provided program: it gives the same communication error :

COM port # is unacquireble  and "COM port # is not set up"

 

I think I completely messed up the NI-max port setup (in the pdf it said the driver for the device should not be installed but Windows had already done it). 

 

So: how do I undo/delete the ni-max configuration?

what do I need to do in order to properly set up the communication between Labview and hamamatsu ?

 

Please help, I am lost.

 

 

 

Download All
0 Kudos
Message 1 of 62
(7,537 Views)

the Hamamatsu HV supply uses an FT232BM chip.

 

For a moment, the computer communicated with the supply: using visa test panel, basic I/O:

write-ok, no err

query,read error. Timeout expired before operation completed.

I increased the timeout to 15000ms (from2000) and the same result for query,read.

 

I will try to go back, delete virtual com3 port created by Windows when I plugged in the hamamatsu HV supply and set up the USB raw device according to the tutorial.

 

0 Kudos
Message 2 of 62
(7,469 Views)
Do NOT use the VISA wizard! That will just break the provided driver for the com port. There are many reasons for s timeout and changing the time seldom fixes it. Check the cable type and the port settings.
0 Kudos
Message 3 of 62
(7,467 Views)
p.s. You have to get the provided code working again. I don't quite understand what you did to break it but until you fix that, you will just be spinning your wheels with LabVIEW.
0 Kudos
Message 4 of 62
(7,465 Views)

I just read your reply;

using the tutorial, I have created the HamamatsuC95255.inf and, after right click and Install, no .PNF file was created.

I was about to ask why is it that it had not been created but I came across this

https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Can-t-create-PNF-file-from-INF-file/td-p/215...

  

searched windows folder and found hamamatsuc9525_vista&7.PNF .

 

Now, at Update Driver Software, I don't know what to select: it is a high voltage power supply but the computer talks to a fdmi chip, so should I select Processor or Ports ? 

 

this is becoming a waste of time.

0 Kudos
Message 5 of 62
(7,460 Views)

posted twice

0 Kudos
Message 6 of 62
(7,460 Views)
That makes no sense. As I said, you do NOT want to create your own driver. Why do want to even after I've said it would be a mistake? Do you have any experience with USB RAW? Do you have the very low level functions from the vendor?

Yes, your actions are a waste of time. The tutorial is only for experts and when a driver is not already provided.
0 Kudos
Message 7 of 62
(7,453 Views)

As I stated, I had not seen your post.

I will not go further into this.

Since you are here , Dennis, what are your thoughts on how I should proceed?

 

I am trying to control a simple high voltage source using the national instruments suite of products.

If you were in my position, how would you approach this task?

 

This is my first attempt at controlling a real instrument via labview (at University we only learned about virtual modules, no acquisition from outside the computer). 

 

 

0 Kudos
Message 8 of 62
(7,448 Views)
Once you restore the original setup, everything should work. Your original error was probably caused by having the vendor's program open at the same time. All that you really needed to do was close it. A search got that error would have explained that.
0 Kudos
Message 9 of 62
(7,441 Views)

I searched this forum thoroughly and tried most of what was suggested but none of it worked.

I will delete the files created and go back to installing the FTDI driver and work from that point. 

0 Kudos
Message 10 of 62
(7,432 Views)