08-03-2018 07:12 AM
My task is to detect the head and end of the frame from a receive massage packet (1D array), and then store the data in different array. But the error is: the variable is not defined in the script,if the variable is not defined, it is impossible to add output, please help solve it.Thanks
08-03-2018 07:24 AM - edited 08-03-2018 07:31 AM
08-03-2018 07:35 AM
Because of the large number and 16 channels, I also thought about using Labview G,for example :Index array but I don't know how to program according to the meaning of the code.Can you give me a hint?
08-05-2018 10:19 PM
Look for a data package from a 1-D array,
for example: 1-D array data package : 0 0 0 0 A B 1 2 4 5 6 7 8 9 D A B 2 5 6 8 4 7 2 1 D A B 1 2 8 9 6 7 8 9 D A B 1 2 4 7 5 7 2 1 D .....
A B : Frame header 😧 trailer
I want to separate the data in the middle of the end of the frame header into different 1D arrays.
Thank you !
08-05-2018 11:59 PM
Whether the length of Date Package is constant.
Simple Logic Will be Index the Start of Data Packet (I1,I2 and In) and Compare with the Expected Values (A,B and D) in a Loop.
Whenever the Comparison satisfies Separate the data in the format of your choice.
08-06-2018 01:13 AM
Instead of "different 1D arrays", I would recommend a 2D array with one row per payload.
Do you have the entire data available or is new data coming in continuously? What should happen to incomplete frames? Are all frames of the same lenght?
08-06-2018 01:45 AM - edited 08-06-2018 01:46 AM
Hi USTC,
what's wrong with my last suggestion?
Why do you think you need to create a new thread for the same topic?
separate the data in the middle of the end of the frame header
You really should rephrase this sentence!
What's "in the middle of the end of the header"? 😄
08-21-2018 02:58 AM
@GerdW
@GerdWExample:
Thank you for your reply. The tunnel mode output of the loop structure should be a connection instead of index. If the tunnel mode is the final value or index, the output has only one set of data, and the tunnel mode is connection. The eligible data is repeated 16 times. Collect output to an array, why?
Question 2: Why use a circular structure to output why use a 2-D array, and take a 1-D array should be fine.
08-21-2018 03:36 AM
Hi USTC,
The tunnel mode output of the loop structure should be a connection instead of index.
Why do you think so?
When parsing datastreams I prefer to receive an array of "messages" instead of another "stream of messages". That way I can use an autoindexing loop to process those messages. That's why I used the indexing tunnel.
In your case a "message" is a 1D array of values, so my suggestion delivers a 2D array of values.
Conclusion: when you prefer concatenated data you could use the concatenation mode. It's up to you!
Why use a circular structure to output why use a 2-D array, and take a 1-D array should be fine.
Where do you see a "circular structure"?
08-21-2018 04:08 AM
Thank you for your prompt reply. In your plan, there is a problem with the loop structure stopping. It stops when it collects a set of data.
@GerdW