LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to split a string on the basis of space in labview.

Could you share your VI where the serial string is generated ? 

Pictures are not enough to get the whole details on your application.

0 Kudos
Message 11 of 17
(964 Views)

@Defaphe  ha scritto:

Could you share your VI where the serial string is generated ? 

Pictures are not enough to get the whole details on your application.


The vi is not enough, too. We need the value of the received string. Do the following:

Run the vi putting the whole string into an indicator.

Choose Edit -> Make Current Values Default.

Save the vi (possibly for a previous version if your LabVIEW is very recent).

Upload the vi.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 12 of 17
(955 Views)

Vi will not work without the device connected.

0 Kudos
Message 13 of 17
(942 Views)

@Deepti_Singh  ha scritto:

Vi will not work without the device connected.


We don't need to run the vi. We only need to see the content of the string returned by the device.

An alternative is: run the vi sending the returned string to an indicator; right click the indicator and select '\' Codes Display; take a picture of the indicator and post here (make sure that all the content is visible).

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 14 of 17
(936 Views)

My guess is your serial communications is completely wrong.  If I was taking a complete shot in the dark, I would say you are using the Bytes At Port to tell the VISA Read how many bytes to read.  When you do this, you are extremely likely to be getting incomplete messages.  So...

 

1. What device are you attempting to communicate with?  Does it have a programming manual or something telling you the format of the data messages?

2. You may want to give this video a watch: VIWeek 2020/Proper way to communicate over serial


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 17
(926 Views)

@crossrulz  ha scritto:

My guess is your serial communications is completely wrong.  If I was taking a complete shot in the dark, I would say you are using the Bytes At Port to tell the VISA Read how many bytes to read.  When you do this, you are extremely likely to be getting incomplete messages. 


It's definitely possible, however here the OP shows an example of serial comm where the received message does contain both numbers, but Search Pattern fails (at least, fails the way it's used).

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 16 of 17
(917 Views)

@pincpanter wrote:

@crossrulz  ha scritto:

My guess is your serial communications is completely wrong.  If I was taking a complete shot in the dark, I would say you are using the Bytes At Port to tell the VISA Read how many bytes to read.  When you do this, you are extremely likely to be getting incomplete messages. 


It's definitely possible, however here the OP shows an example of serial comm where the received message does contain both numbers, but Search Pattern fails (at least, fails the way it's used).


Then maybe the instrument is using a tab instead of a space.  Regardless, we need more information on how the data is generated and how is it being read.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 17 of 17
(907 Views)