取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 10 条)
4,374 次查看
Can you please post your code so we can see what you are doing?
Cory K
0 项奖励
2 条消息(共 10 条)
4,368 次查看

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 项奖励
3 条消息(共 10 条)
4,360 次查看

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 项奖励
4 条消息(共 10 条)
4,329 次查看

Hell Nathand,

 

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

 

Thanks

0 项奖励
5 条消息(共 10 条)
4,295 次查看

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 项奖励
6 条消息(共 10 条)
4,284 次查看
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 项奖励
7 条消息(共 10 条)
4,283 次查看

Nathand,

 

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

 

Thanxs

 

Shanth.

0 项奖励
8 条消息(共 10 条)
4,279 次查看
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 项奖励
9 条消息(共 10 条)
4,271 次查看

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 项奖励
10 条消息(共 10 条)
4,153 次查看