LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial command not working in Labview, but it works in docklight

Solved!
Go to solution

I am trying to run a RGA via labview.

I can control the RGA via docklight (see attachment), but when I try to give the same command to labview, I do not get a responce. What is going wrong?

What do I mis in the VI?

 

Best regards,

 

Rens

Download All
0 Kudos
Message 1 of 7
(4,190 Views)

Hi RvG,

 

The data you are sending in the vi is not in Hex. If youright click on the write buffer string and select 'Hex display'

 

Rgs,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 2 of 7
(4,183 Views)

1) Try adding  a  "end of line" constant (nothing but a enter character or new line) to the data you are sending (000 002 081 016)

 

2) Are you sure that the default settings (like the baud rate and parity and others) are good enough for the communiccation?

 

Guru

 

 

Regards
Guru (CLA)
0 Kudos
Message 3 of 7
(4,181 Views)

I changed to the Hex display but this is not resulting in better results?

The serial settings are the same I use in Docklight (see upper right corner).

 

Any other ideees?

 

Best regards,

0 Kudos
Message 4 of 7
(4,157 Views)

in your original example when you was sending the ascii value instead of the hex you had spaces in between your values. This will send the ascii value for a space. Do not add this. Write the data string that you want to send without spaces:

 

data serial.png

 

This may work.

 

Rgs,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 5 of 7
(4,143 Views)

I made some modifications, observations and comments.  See if this helps.  Be sure to check the flow control requirements as well as the actual commands that need to be issued.  You will need to parse the data upon return, again, check the documentation.

good luck

modifications.png


Paul
Message 6 of 7
(4,127 Views)
Solution
Accepted by RvG

Your code is sending a string which represents the decimal values.  You need to convert to Hex string first.  See code snippet below.

(I'm sure there is a better way of doing this, but I did it quickly - might be a Rube Goldberg candidate 😉  )

 

(wow.  lot's of people posted while I was busy with work rleated stuff..  😮 )

 

Here goes anyway..  You could have added the code below to convert to Hex equivalent string, or simply write the Hex values in the string directly (probably better).

 

 

 

 

Message Edited by Ray.R on 04-15-2010 09:01 AM
0 Kudos
Message 7 of 7
(4,119 Views)