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: 

Sending one byte with Rs232 ?

Hello,
I have a device, which works with 1-byte commands.
example:
0xD1 has to be sent, where the high nibble (D) is one of six commands and the low nibble (1) is one of 15 possible addresses.
Commands are: E,C,D,8,5,4
Addresses are: 1-F
There are 90 possible combinations of commands and addresses.

I made a program, where i can choose the command and the address separately, and they will be combined individually in one string, which should be one byte.

Now the problem:
If i send this string via RS232 to a PC-Terminal, i see exakt the same string as in my program.
>> 0x51 should be the combined string and I want to see a "Q" at the terminal but the result is "51".
There are sent two bytes (0x35 and 0x31 for "51") than one 0x51 "Q".

When I make a Stringelement (with property "HEX-Display") and typing in the number (51) directly, i get a "Q" on the terminal.

How can i automate this?
I really spent a lot of time on this problem!
0 Kudos
Message 1 of 5
(2,530 Views)
Here is the program
0 Kudos
Message 2 of 5
(2,519 Views)
See attached vi.
Hope that helps.
Neil
0 Kudos
Message 3 of 5
(2,512 Views)
Thank you very much!!
This is exactly what i was looking for.

Markus
0 Kudos
Message 4 of 5
(2,507 Views)
I hope you don't mind, but I took the liberty of modifying the block diagram to make it much more readable, and I got rid of the local variable which is unnecessary. Compare this block diagram to the one using the sequence structures. In this diagram, all of the code is visible at one time. The data flow insures that the funtions will operate in the correct order. This is the preferred method of coding over using sequence structures.
- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 5
(2,494 Views)