02-13-2024 01:42 AM
Dear Altenbach
I absolutely agree not to attach with LV 2024 and not renaming the file.
Sorry it was my fault. But as you already made a fine solution I will not downconvert and upload a slightly differnt version.
This would make the tread even more confusing.
02-13-2024 03:09 AM
Hi Altenbach,
You have right. I made some confussion with my posts.
I asked to You because I saw, that You offered solution in this thread.
Let me apologize for this chaos from my side.
Thank You for support. I will test solution and back to discussion.
I will be more clear in future.
best regards
Tom
03-03-2024 02:06 PM
Hello Again,
I'm still struggling with my labVIEW code.
After several transformation data from sensor (messages collected in "Input Array" ) I have to separate each 18 following frames if in the first 6 rows is 1. Thanks to the help of Altenbach I started exercises with provided code.
Unfortunately I stuck again.
How to restart For Loop and search in next array rows?
I would like to not stop with conditional terminal but skip of 18 rows at "Array to search" and restart searching to capture next message which starts with following "111111".
I was trying to use shift registers, feedback nodes, case structures but up to now without good result.
Array subset will be used to other simple calculations.
I attached VI with Input array data ( Made current values as default)
Could You suggest something?
Thank You
Best regards
03-04-2024 01:27 AM
Hi Tom,
@Tom_wolf wrote:
How to restart For Loop and search in next array rows?
To "restart" the FOR loop you need to place a loop around the shown code: with the next iteration of that loop your FOR loop will be restarted...
03-04-2024 01:53 AM
Hi GerdW
Below is screenshot from cleaned VI. I also attached VI with accompanying input data.
I'm wondering how to "cutting out" continuously arrays like as "found match" from flowing data ?
I'm aware also that "Array to search " can not rise to infinity - shall be cleared somehow to avoid overfilling, for example after reaching (100 x 18) rows.
Could You give me some suggestions?
Best regards
Tom
03-04-2024 08:18 AM
Hi Tom,
@Tom_wolf wrote:
Below is screenshot from cleaned VI. I also attached VI with accompanying input data.
I'm wondering how to "cutting out" continuously arrays like as "found match" from flowing data ?
I'm aware also that "Array to search " can not rise to infinity - shall be cleared somehow to avoid overfilling, for example after reaching (100 x 18) rows.
Could You give me some suggestions?
Well, a "cleaned" VI with lots of bended wires… 🙂
03-04-2024 09:01 AM
Hi Gerd,
Content of first For Loop is algorithm to get Information from Message from Sensor which is decoded in SENT (SAE J2716 SENT) - Slow Channel Portion. It's a long story...
Now I have to collect 18 following messages and go throw number 216017185 ( for example) to single bit (0/1).
If six following bits are : 1 1 1 1 1 1 - it means new message arrived - this is identification. Then from rest 12 bits I have to build data reference and corresponding data. Then from following portions of numbers I have to concatenate full information.
The data which arrives from array ( String) is form bigger system and flows continously and very fast.
This small application which I build is only to exercise potential solutions - how to capture ( cout out from data stream each 18 messages ( 6 x 11111 - which mean start of new frame + 12 bits of data).
I prefer to work with small sub-programs in order to verify how it could work and then I'm transferring as sub-VI or raw code to bigger application.
It's like enigma😥.
Could You support me with efficient capturing this data ( I mean selecting 18 rows if first 6 rows = 1), please?
Best regards
Tom
03-04-2024 02:59 PM
Hi Gerd,
there is my solution.
The upper table is implementation in Excel, and below is LV code according to Your hints.
I used 54 as N-Terminal input value because there are 3 x 18 messages - to make exercises.
Timers to improve observations.
Now I must move it to global application.
Let me know Your comments.
Best Regards
Tom
03-05-2024 01:04 AM - edited 03-05-2024 01:04 AM
Hi Tom,
@Tom_wolf wrote:
Now I have to collect 18 following messages and go throw number 216017185 ( for example) to single bit (0/1).
See this:
No loop, just some simple math, only 1 (ONE!) conversion from string to numeric…
03-05-2024 06:22 AM
Hi Gerd,
Brilliant!
Simple and functional!
One question- How to change display of second bit:
To have 0100 instead of _100?
best regards
Tom