ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creat 2d array with 2 cluster

Solved!
Go to solution

hello every one,

I have a problem,

I want to create a 2D array who display my 2 cluster of my CAN protocol

I give you my program and I use PCAN drivers in my program

drivers :

https://lavag.org/topic/15784-cr-pcan-driver_lv2009/#comment-95558

 

0 Kudos
Message 1 of 14
(1,511 Views)

Hi letesego,

 


@letesego wrote:

I have a problem,

I want to create a 2D array who display my 2 cluster of my CAN protocol


Which problem do you have?

Which 2 clusters do you want to process?

Why should there be a 2D array (for display purposes)?

Can you provide a simplified VI with just those 2 clusters and the expected resulting array?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 14
(1,505 Views)

Hi GerdW

I want to create 2D array indicator who included my data in my 2 cluster so read and write output

the goal it's when a new data was read or write, the data was integrate in the array.

I hope you understand my problem

letesego

0 Kudos
Message 3 of 14
(1,494 Views)

Capture.PNG

0 Kudos
Message 4 of 14
(1,490 Views)

Hi letesego,

 


@letesego wrote:

I hope you understand my problem


The image in message #4 helped more than your text…

 

Suggestion:

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 14
(1,487 Views)
Spoiler
that not solve my problem I want add the new data in a other column and keep the old data 
sorry if my english isn't good
letesego
0 Kudos
Message 6 of 14
(1,478 Views)

Hi letesego,

 


@letesego wrote:
that not solve my problem I want add the new data in a other column and keep the old data 

Please define how to "add new data to a different column": how should the result look like?

 

My example keeps ALL data, regardless of "new" or "old", so please again: define how the result should look like!

 

Btw. there's no need to hide your message in a spoiler tag…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 14
(1,462 Views)

Capture labview.PNG

0 Kudos
Message 8 of 14
(1,455 Views)
Solution
Accepted by letesego

Hi letesego,

 

so you want to place ONLY the data arrays of write/read CAN cluster into your 2D array!?

Why don't you write so?

 

Simple solution:

  • Unbundle the data arrays from both CAN clusters.
  • Concatenate both 1D arrays into a larger 1D array.
  • Autoindex the 1D array at the loop border into your 2D array…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 14
(1,444 Views)

Hi GerdW

That was my best try but that not work

I'm testing many thing like use for loop

I think I haven't a good used with array

Could you help me a last time ?

Best regards

letesego

Capture labview2.PNG

0 Kudos
Message 10 of 14
(1,381 Views)