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

thank you!

did that: *idn\r 

read operation 

return count 4 bytes 

BCBC

 

before, it was 2 bytes 

BC

 

the error still stands: timeout expired before operation completed

0 Kudos
Message 21 of 62
(3,158 Views)
Did you verify if that command is in the manual? What about the driver you downloaded? Also, the termination character had to match what the instrument is sending. Did you change It to the correct one?
0 Kudos
Message 22 of 62
(3,153 Views)

the read device setting command is

R<CR>

the response can be

13bytes of data if the read is successful or

BC if failure.

 

Where can I enter these commands; for example, if I wanted to set the LCD off,

the command is: B<0h>CR

 

Where may I enter this command in order for it to be sent to the source?

 

the "select or enter command" drop down menu : how do I use it? 

what does it do? 

0 Kudos
Message 23 of 62
(3,150 Views)
What menu are you talking about? In MAX?
0 Kudos
Message 24 of 62
(3,147 Views)

yes,in max

input/output, top right

below are

 

write query read clear

buttons

 

0 Kudos
Message 25 of 62
(3,144 Views)
You have a text box on the write tab so enter your command there. I thought you were already doing this when you got the timeout error.

Have you tried the driver you said that you had?
0 Kudos
Message 26 of 62
(3,140 Views)

rigt now I am at home and I cannot connect the source.

On the test panel I have 4 large buttons:

configuration, input/output,advanced, NI i/o trace

 

on configuration submenu:

serial settings,flow control settings, i/o settings/view attributes.

on i/o settings:

write,query,read, clear

 

Where, on those menus, could I find a textbox that accepts commands(apart from the small window on the top-left with *idn\r  )? 

 

 Regarding the driver:

-the one for the operating system is working properly;

-when I searched using Instrument Driver Finder I found an example called Hamamatsu C9525.

I opened it and tried to run it but it resulted in an error which was expected given the Max error.

 

Now I don't have with me the power source this weekend but I took the laptop with me home because I would really like to learn how to use NIMAX and Labview for control and acquisition, so I will try to install a webcam using MAX and control it in LabView.

Hopefully, by Monday, I will be more literate in Labview. 

0 Kudos
Message 27 of 62
(3,136 Views)
That little window is what you use. Delete the default string that is there since your instrument does not support it.

A camera will be completely different than the power supply.
0 Kudos
Message 28 of 62
(3,132 Views)

Alright:

So I'll delete the column of instructions and insert the ones which the HV source understands.

 

I can't wait for Monday to try this...

until then, I will try what I said: become familiar with LabView in controlling an actual device(as opposed to VI simulations).

 

Dennis, your patience and the quality of your advice have been outstanding!

Thank you very much for that ! 

 

0 Kudos
Message 29 of 62
(3,124 Views)

Hello again!

in the manual, to set the high voltage output,

command: V<value1><value2><CR>

argument value 1: 0h~14h
               value2: 0h-63h

response: success: VA

             failure:BC,BA

Notes:
Input value1 and value2 in binary.
The range of value1 is from 0 to 20.
The range of value2 is from 0 to 99.
High voltage output = <value1> x 100 + <value2>
High voltage output is limited to maximum voltage or less.

 

As shown below, the command line can be also described in binary.
<56h><value1><value2><0Dh> ※hexadecimal representation
For example, in the case of Visual Basic, when you want to set the
high voltage output at 1000V, you can write as follows;

 

Dim Cmd
Cmd = “V” + Chr(10) + Chr(0) + Chr(13)

 

or


Dim Cmd(3) As Byte
Cmd(0) = 86 : Cmd(1) =10 : Cmd(2) = 0 : Cmd(3) = 13

 

I copyed and pasted

 

Cmd = “V” + Chr(10) + Chr(0) + Chr(13)

 

then

Cmd(0) = 86 : Cmd(1) =10 : Cmd(2) = 0 : Cmd(3) = 13

 

then

 

Dim Cmd
Cmd = “V” + Chr(10) + Chr(0) + Chr(13)

 

then

 

Dim Cmd(3) As Byte
Cmd(0) = 86 : Cmd(1) =10 : Cmd(2) = 0 : Cmd(3) = 13

 

into the selector enter command window, pressed write , pressed query

but the voltage setting remained unchanged at 0Volts

and I received:

1:write operation(cmd=\x93v\x94 + chr(10) + chr(0) + chr(13) )

return count: 38 bytes

 

2: read operation

return count 2 bytes

BC

 

 

how should I write this simple instruction in order to set the voltage?

what am I doing wrong?

 

0 Kudos
Message 30 of 62
(3,106 Views)