01-13-2022 02:34 AM
Could you share your VI where the serial string is generated ?
Pictures are not enough to get the whole details on your application.
01-13-2022 03:22 AM
@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.
01-13-2022 07:52 AM
Vi will not work without the device connected.
01-13-2022 08:05 AM
@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).
01-13-2022 08:41 AM
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
01-13-2022 09:38 AM
@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).
01-13-2022 11:29 AM
@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.