From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB to RS-232 Transition

Sorry.. i forgot to attach my VI.

 

Here it is.

0 Kudos
Message 11 of 20
(1,367 Views)

Sorry..Forgot to post the VI.. Here it is

0 Kudos
Message 12 of 20
(1,366 Views)

Hi Pa1,

 

can you answer the questions from my last post?

Especially the question on TermChars?

 

Does your device wait for a special TermChar when receiving commands over RS232? What is mentioned in your manual on this topic? RTFM…

 

Using BytesAtPort is also wrong here! How many bytes do you expect in the receive buffer immediatly after sending a command? Either use the TermChar described in your manual or request the exact number of bytes in the expected message!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 20
(1,364 Views)

Here are the answers.

 

1) The coonections are perfect.

2) I have sent only the *IDN?\n command

3) What is TermChars?..Is it terminal characters. I have tried it with \n and without it..but the result is same

4) VI is attached?

0 Kudos
Message 14 of 20
(1,357 Views)

Hi Pa,

 

2) I have sent only the *IDN?\n command

No, you don't!

There is no NL char (\n, new line) in your command!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 20
(1,351 Views)

Hii..GerdW...

 

The result is the same even if the \n is added. 

 

 

0 Kudos
Message 16 of 20
(1,354 Views)

Hi Pa,

 

there is a difference between the NL char and your "\n" chars!

 

You wrote two chars: "\" followed by "n".

Your device expects a NL char, written in \-code-display as "\n" or in hex-code-display as 0A!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 20
(1,347 Views)

Thanks GerdW...

 

Are RS232 and GPIB command format the same?

0 Kudos
Message 18 of 20
(1,339 Views)

Hi Pa,

 

Are RS232 and GPIB command format the same?

As has been mentioned several times before: Read the manual of your device! RTFM…

 

(Most often the commands are the same. But as I already mentioned above the termchar may change.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 20
(1,330 Views)

You are not configuring your serial port!

 

Try something like this:

serial.png

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 20 of 20
(1,323 Views)