10-23-2014 03:07 AM
YOU ARE RIGHT, DENNIS, IT WORKED!
command in Ni-Max : R\r
Port opened by process "NIMax.exe" (PID: 984)
Request: 23.10.2014 10:53:38.21264 (+98.1106 seconds)
52 0D R.
Answer: 23.10.2014 10:53:38.38864 (+0.1760 seconds)
00 00 0A 00 01 00 05 01 01 00 00 00 2D ............-
command in ni-max: F\r
Request: 23.10.2014 10:56:01.85264 (+142.4481 seconds)
46 0D F.
Answer: 23.10.2014 10:56:01.94664 (+0.0940 seconds)
56 65 72 31 2E 36 30 20 43 39 35 32 35 2D 30 33 Ver1.60 C9525-03
46 41 30 30 31 35 20 20 FA0015
Identical to what the hamamatsu control software did.
In the "return data" box I still get the error
Read Operation
Error
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
Regardless of that error, this is great .
Thank you , Dennis!
I shall now try to set up the voltage value and after that, if all goes well, create a labview VI with which to control the paramaters from a GUI.
10-23-2014 04:49 AM
What kind of representation does visa use?
V\01\00\r + WRITE =>voltage bECOMES 100V
V\01\07\r =write =>107 V
V\01\08\r hit enter=> it becomes V\01\b\r hit write => 108v
v\01\c\r ,enter, becomes v\01c\r write=> 199v ????
what is this?
00A=65
00P=80
so it uses a combination of ascii characters
until 7, where dec,hex,oct are identical it's ok
101v =01\01
107v=01\07
then
108v=01\b ?
109v=01\t
180v=v\01P\r P=80ASCII
165v=v\01A\r A=65ASCII
133v=v\01!\r !=33 ASCII
HOW can I work with this?
how do I set the representation to hexadecimal ?
I can precisely read/open HVout/close the source.
How do I create a virtual instrument with these commands?
Set up a panel with 3 knobs and a VISA i/o ?
please help me!
10-23-2014 07:59 AM
10-24-2014 07:59 AM
ok.
I have set up this (attempt at a) Virtual Instrument:
the one which you can see in the attached picture .
I have communication with the Hamamatsu source(it displays REMOTE) and I receive on the error indicator the message BC which is also from hamamatsu: Bad Command.
The same old error :
Timeout expired before operation completed.
By trying all sorts of things in Nimax, I noticed that I don't get any errors during Read
IF the Bytes to read perfectly matches what the Hamamatsu source returns
Example:
F\r + set Read nr. bytes to 24 (the nr of bytes which Hamamatsu returns)
Query returns no error:
Read Operation
VISA: (Hex 0x3FFF0006) The number of bytes transferred is equal to the requested input count. More data might be available.
I will look into this on Monday.
Until then , any suggestion is welcomed.
10-24-2014 08:42 AM
10-27-2014 04:31 AM - edited 10-27-2014 04:57 AM
Oh, so by writing "24'' in that constant of the ''byte count'' input I actually commanmded it to Cancel
13 is the Carriage Return.
I was confused because of the name "byte count" which , to me , implied a number equal to that of the bytes to be read
and because in this video:
http://www.youtube.com/watch?v=W4VZHwpSW1M
the person used 1024 as a constant input.
I modified the ''Visa Configure serial Port'' as follows:
0xA='\n'=LF
to
0xD='\r'=CR
to set the carriage return.
timeout
from 10000ms
to
2000ms
note: the parity port shows a coercion dot but the timeout value does not
and when the timeout was 10 000ms , it took 10 s to get the error and now,when it is 2000ms it takes 2 so this is another reason to believe that the port uses the numeric value literally and did not convert it to another data type.
Now, that I have modified the visa config. serial port and the VISA read constant to 13 ,
what am I still doing wrong, because I still get the error
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
Is the VISA write buffer command ok?The only input I wrote is R\r or R
to which I received Bad Command (R\r) and nothing (R) on the Serial port monitor.
What should I do in order to stop receiving this timeout error?
! correction: I did not modify
the ''Visa Configure serial Port'' as follows:
0xA='\n'=LF
to
0xD='\r'=CR
I had only modified the LABEL.Jesus!
Now, when I tried to modify in the front panel from A to D ,
Labview shut down with an error.
I will try to modify this termination characted to D.
I modified it to D in VISA ConfigSerialPort but it jumps back to A
10-27-2014 06:15 AM - edited 10-27-2014 06:44 AM
The problem is that visa is sending the wrong commands to the Hamamatsu source:
looking at the Free serial monitor read :
typed R\r in the write buffer =>
Request: 27.10.2014 13:04:45.19464 (+37.4921 seconds)
20 52 5C 72 0A 0A 0A R\r...
Port closed
The correct command is
52 0D R.
typed R =>
Port opened by process "LabVIEW.exe" (PID: 4944)
20 52 0A 0A 0A R...
Answer: 27.10.2014 13:05:15.48064 (+0.0930 seconds)
42 43 BC
Port closed
What do i need to write in the write buffer in order for the output to become
52 0D R.
?
edit:
click write buffer, right click, select "hex display"
write:
520D
IT WORKS!!!!!!!!1
NO ERROR FOR THE FIRST TIME!!!!
however, the byte count on visa read has to be set manually:
13 bytes for read the device setting
24 bytes for read information.
10-27-2014 07:20 AM
10-27-2014 10:18 AM
Thank you, Dennis!
Alright, I created a constant set to True on the Enable term char of the Visa serial subVi.
Now I have to make buttons on the front panel,
each sending a command such as R-read,F-readInfo,D-quit, V-voltage setting et c.
in a way that, when I press
-Read it sends 520D to the Write buffer of Visa Write
AND
"13" to the VISAread byte count.
-Read info sends 460D to Write buffer
and
24 to visa read byte count.
10-27-2014 03:32 PM