Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring Hexadecimal data, VISA communication

Hello,

 

I would like to receive hexadecimal data sent from a Pyrometer.

I've written a very simple VI, and I used the scan from sting vi, and set it to scan a Hexadecimal integer. I 've tried too many options, commands types  and so on, but I am receiving  all the time the error :

 

----------------

 

Possible reason(s):

LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
=========================
Command requires GPIB Controller to be Controller-In-Charge.

 

 

-------------------------

I cannot till now find what could be the problem, since even when using the probe to check the data at every line nothing seems to be working even to set up the serial parameters or send the command...

 

Any hints will be very appreciated.

 

Thank you in advance

 

Tania

0 Kudos
Message 1 of 7
(463 Views)
Highlighted

Hi

Just a few questions

1) Are you sure the device is connected to com1?

2) Did you try other com ports?

3) You request 1024 bytes. Are you sure they are delivered, otherwise ask to start 16 bytes.

4) Is some handshake possible or even better an endcharacter defined like CR or LF?

 

greetings from the Netherlands
0 Kudos
Message 2 of 7
(446 Views)
Highlighted

What is the exact string you are getting back from your instrument?  What is the error code and where is it coming from?

 

What exactly do you mean by "Hexadecimal" data.  Is it an ASCII string with hexadecimal characters?  Or is it raw/binary data (you can't read it in a simple text editor)?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 3 of 7
(439 Views)
Highlighted

Hi  

thank you for your reply 

Just a few questions

1) it is not all the time com1 since I 've tried different ones. 

3)  I've requested before that 32, was the same problem.

4) yes I used a carriage return in the command: I set it to 00mw2\r ==> then changed it to  00mw2<CR> thinking it will be working this way.

 

 

0 Kudos
Message 4 of 7
(431 Views)
Highlighted

Hello 

following the byte values (decimal) which would have to be in the output buffer one after the other for the command to be accepted:(48 48 then corresponds to address 00)

48 48 109 119 50 13 (this corresponds to the command text 00mw2<CR>.

After submitting the request, wait at least 1 ms for the answer (we usually use a longer timeout; I would suggest 50ms for the application as a test).

The answer (consisting of 4 hexadecimal characters and <CR>) is then something like 0BB7<CR> which corresponds to 299.9°. As byte value: 48 66 66 55 13

---------------------------------------------

 

0 Kudos
Message 5 of 7
(429 Views)
Highlighted

@Tanieta wrote:

The answer (consisting of 4 hexadecimal characters and <CR>) is then something like 0BB7<CR> which corresponds to 299.9°. As byte value: 48 66 66 55 13


Ok, that is what I call "ASCII Hex", which is a hexadecimal value represented with ASCII characters.  So at least we know what the data is.  Your VI should be handling this correctly.

 


@Tanieta wrote:


With error you stated earlier, I am left to believe you have an incorrectly configured VISA session, most likely not using an available port.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 6 of 7
(413 Views)
Highlighted

@

0 Kudos
Message 7 of 7
(333 Views)