From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Indexing array to acces individual elements

Iam trying to connect a array to a invoke node Bit i couldnt succed..Iam getting an error saying

 

                ""You have connected an array datatype to its element data type.This type of conflict may be resolved by indexing the array        access individual elements of the array.Check for a tunnel on a loop that has indexing incorrectly enabled"".

 

Can anyone pls help me out how to reslove this kind of error.

 

Thank You,

 

Shanth.

0 Kudos
Message 1 of 10
(3,210 Views)
Can you please post your code so we can see what you are doing?
Cory K
0 Kudos
Message 2 of 10
(3,204 Views)

Hello Cory,

 

                Thanxs for your reply, Iam attaching the VI and a Image where Iam getting an error. In the VI I have to connect the "Data to write " which is an array to the "Value" in the invoke node which is not an array.. Can u pls help me out how to do this.

 

Thank you,

 

Shanth.

0 Kudos
Message 3 of 10
(3,196 Views)

It looks to me like you're trying to pass your CAN data to ncWriteNet as an array of eight bytes, but your DataChannels ActiveX object expects a double-precision floating point number.  Since both of those are the same length (8 bytes or 64 bits) you can typecast your array to a double to pass to the SetValue method.  See image below.  The typecast function is found in the numeric palette under data manipulation.

Message Edited by nathand on 06-18-2009 05:41 PM
0 Kudos
Message 4 of 10
(3,165 Views)

Hell Nathand,

 

                   It didnt work out for me is there any ohter way todo this.

 

Thanks

0 Kudos
Message 5 of 10
(3,131 Views)

Hi vivekp,

 

what is "It didnt work out for me"?

Don't you find the typecast or did it not work with your ActiveX component?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(3,120 Views)
Could you explain more than "didn't work out"?  Are you still getting a broken wire, or were you able to run the code but it did not work as you expected?  It's possible that there's an issue of endianness, which could be solved by inserting "Reverse 1D Array" just before the typecast.
0 Kudos
Message 7 of 10
(3,119 Views)

Nathand,

 

             Its not giving any broken line I was able to run the VI but couldnt find out the expected solution.

 

Thanxs

 

Shanth.

0 Kudos
Message 8 of 10
(3,115 Views)
In order for anyone to provide you more assistance you're going to have to write more than a single sentence, explaining in detail what the problem is and what result you expect.
0 Kudos
Message 9 of 10
(3,107 Views)

Instead of using typecast, maybe you can try using Join Numbers as in the following illustration:

 

 

Join_BD.png

 

Wire the hi.lo U64 into your property node.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 10 of 10
(2,989 Views)