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

Measurement &Automation explorer does not see the device.

It is performing read/write/query operations without error because it probably sees the port without anything connected.

The hamamatsu source should display REMOTE if it were connected to a computer but it doesn't.

How do I undo/delete this MAX project and start again?

How do I get this source to communicate with MAX? 

0 Kudos
Message 11 of 62
(3,711 Views)
Does it now work with the vendor's software and do you see a com port in MAX? That is all MAX will ever do. What are you writing to the port?
0 Kudos
Message 12 of 62
(3,707 Views)

Max sees COM3 "COM3_hamamatsu" as I originally named it.

When I select it and press Validate => Successfully opened a visa session to "ASRL::INSTR".All of the parameters on this page are valid.

If I open VISA test panel, input/output ,press write

write operation (*IDN>\n)

return count: 6 bytes

 

the same for

/query/read.

This is the point where last time only write was working and query/read returned an error.

But now the source is not connected so no errors at all.

In all honesty, I don't exactly know what I am doing: my understanding was that visa should set up the communication with the device and that configuration would be used by labview.

But visa, right now, is not sending nor receiving anything to/from hamamatsu

 

 

0 Kudos
Message 13 of 62
(3,705 Views)
I don't know what you mean by 'source is not connected'.

You should be getting a timeout error when you do a read. I'll ask again - is the vendor's software working like it did before?
0 Kudos
Message 14 of 62
(3,703 Views)

no, it is not working: 

COM port # is unacquireble!

yes: input com port #

no: click search button after reconnect the cables.

yes/3 =>

can not connect to com3.

click either ok of cancel after reconnect the cables

 

reconnect cables=> detected new device com3 11:43:51

now it is working. This is ridiculous.

I just unplugged and the replugged the cable.

0 Kudos
Message 15 of 62
(3,700 Views)

ok:

so now, instead of 2 ports: com3 hamamatsu and lpt1 i get a third one

COM3

when I selected that one(com3, newest entry) and clicked validate : successfully opened a visa session et c.

AND "REMOTE" apeared on the hamamatsu display

good news

 

then I opened test panel/input/output

write

no errors

query read operation return 2 bytes

BC

error: visa hex oxBFFF0015 timeot expired before operation completed.

BC is the failure response from hamamatsu.

so, indeed, there is feedback, even if not the kind I was hoping for

 

0 Kudos
Message 16 of 62
(3,694 Views)

Thank you for your patience and advice, Dennis !

Now I must deal with the error

error: visa hex oxBFFF0015 timeot expired before operation completed.

 

it is  not the timeout value: I increased it to 15000ms and the result is the same.

 

write -ok

read -returns error

0 Kudos
Message 17 of 62
(3,693 Views)

in page 18 of the attached manual:

"When creating your own program by utilizing control commands, the following command
is available. In all commands, it is necessary to be terminated by CR(Carriage Return)"

 

so I selected from visa/config/ input/output settings / termination character : Carriage return -\n

Nothing changed.

0 Kudos
Message 18 of 62
(3,688 Views)
The termination character setting is typically used for a read. You also have the wrong character. The carriage return is a \r so append that to the command when you do a write - *IDN?\r
0 Kudos
Message 19 of 62
(3,682 Views)
p.s. The above command assumes that the instrument uses it. I don't know if it does.
0 Kudos
Message 20 of 62
(3,680 Views)