Serial decode

Post your LabVIEW discussions here
Post Reply
Lukas.S
Newbie
Posts: 0
Joined: Mon Jun 24, 2019 6:44 am

Serial decode

Post by Lukas.S »

I have PicoScope 3403D.
I need to set channel A to serial decoding - LIN, and transfer the message to labView.
Can anyone help me?

Gerry
PICO STAFF
PICO STAFF
Posts: 1144
Joined: Mon Aug 11, 2014 11:14 am

Re: Serial decode

Post by Gerry »

Hi Lukas,

You have 3 options:

1/ You can search for an already existing LIN decoding vi, to use with our Labview example for capturing the data.

2/ You can create a vi that will implement the decode, or use an alternative serial decoding format vi (e.g. RS232, for which there are many sources on the internet) and modify it for LIN using the LIN protocol specification (http://www.ti.com/lit/an/slla383/slla383.pdf), and a simpler guide (https://www.csselectronics.com/screen/page/lin-bus-protocol-intro-basics/language/en), and use that with our example code.

3/ You can use PicoScope 6 to capture the data and transfer the decoded data to labview, as follows.
You need to first capture your data with a fast enough sample rate (preferably 25 times the Baud rate, but as a bare minimum 10 times), then go to the menu options 'Tools->Serial Decoding', and click on 'Create', and then select 'LIN'. Next select 'Channel A' for data (the Tools do a good job of determining the baud rate and threshold values but, depending upon the data, i.e. if it is too distorted or noisy, it's possible you may need to tweak them in order get rid of errors).
Once you have the decoded data, then you can export it to a CSV format file. Then you can use a read-from-spreadsheet vi (see here: https://forums.ni.com/t5/Example-Programs/Read-Data-from-Spreadsheet-csv-and-Display-in-LabVIEW/ta-p/3514139?profile.language=en) to import the data into Labview.

Regards,

Gerry
Gerry
Technical Specialist

luohao1989
Newbie
Posts: 0
Joined: Tue Jul 09, 2019 3:16 am

Re: Serial decode

Post by luohao1989 »

Hello, Lukas, have you solved the serial port decoding problem? I am currently experiencing similar problems. I have a PicoScope2204A, I need to set channel A to serial decode - SENT, and send the decoded message to labview in real time so that I can continue the analysis and processing through labview. For the third method provided by Gerry, can you export the decoded data in real time, that is, pass the decoding data to the labview while decoding? Can you help me, thank you. :D :D :D

Post Reply