LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET CAN Write wire error

Hallo, 

I have a message 1 with speed and distance for different objects.The number of objects can be maximum 0f 8.and min 3. Now i want to write the message from CAN 1 to CAN 2.The error:
The type of the source is 1D array of cluster of 2 elements.
The type of the sink is 1D array of cluster of 2 elements.

How to solve this error using Signal XY. The image is attached.

RepMat_0-1702461466046.png

RepMat_1-1702461518535.png

 

The solution I tried:

RepMat_2-1702461988005.png

 

 

 

0 Kudos
Message 1 of 9
(669 Views)

Hi!

Do rightclick -> create constant on the input terminal of the signal write VI. This shows what datatype is expected:

 

SebastianWeber_0-1702466076938.png

 

The outer array loops over the signals.

Each element consists of an array of values and an array of timestamps One could expect that the timestamps define when which value is sent, however, the LV help (2017) says:

 

The timestamp array is unused (reserved) for Signal Output XY. If you change it from its default value of empty, the XNET Write (Signal XY) VI returns an error.

 

 

So, this might be what you are asking for. Note: This will write as fast as possible, i.e. during the next consecutive frames containing this signals.

 

SebastianWeber_1-1702466888464.png

 

Message 2 of 9
(655 Views)

Thank you @ Sebastian.Weber


i tried it in the way below and encountered following problems
       1.i can see the data in the read.Vi only after clicking stop

RepMat_0-1702471500221.png

  2.As i marked in the from panel, The output of read.vi, the first cluster(red marked is part of the signal speed and yellow marked is distance).I want to change this fromat into first cluster with speed and distance of object 1 and second cluster with speed and distanc eof object 2 and so on..

  

RepMat_1-1702472138593.png

How could I modify it?

 

0 Kudos
Message 3 of 9
(643 Views)

Hi!

 

1.: In your diagram, I can't see any indicator attached to Signal Read. Where is it? If it's outside the while loop, it will be updated only after leaving the loop by pressing the stop button. And depending on the type of tunnel (connection from inside loop to outside), it might display none or not all data.

 

2.: Please read my last answer carefully. You must create two clusters of timestamp[] and value[]. One where value[] contains all speed values, and one where value[] contains all position values. Build an array of those, and feed it to SignalWrite.

0 Kudos
Message 4 of 9
(624 Views)

Hallo,


I had a problem with communication between CAN A and CAN B.I have added the front panel and block diagram.

Problem statement: I have two meesages 1 and  2. which contain speed and distance.I am sending the speed and distance from CAN 1 to CAN 2 and then manipulating only the distance, store in memory.In the next stage, I have to send the speed and modified distanceform CAN 2 to CAN 1.The Block diagram and front panel is as below

FP.png

 BD 

 

BD 1.pngBD 2.png



 I could write the data and read it in CAN 2 but after manipuating it seems not working.

What would be the problems?
How can I change based on the problem statement?
Are there any better ways of doing it?

Thank you in advance.





0 Kudos
Message 5 of 9
(584 Views)

follow up

0 Kudos
Message 6 of 9
(497 Views)

Hallo RepMat,

 


@RepMat wrote:

I could write the data and read it in CAN 2 but after manipuating it seems not working.


What do you mean by "seems not working"?

Do you get any errors?

Can you see the messages on your CAN debugging tool attached to the CAN bus?

Best regards,
GerdW


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

This error occured ar Signal In XY for the second while loop

Error -1074384895 occurred at XNET Create Session (Signal Input XY).vi:4640002

Possible reason(s):

NI-XNET: (Hex 0xBFF63001) An internal error occurred in the NI-XNET driver. Solution: Contact National Instruments and provide the log files found in %LOCALAPPDATA%\National Instruments\NI-XNET\log. Note that this location might be hidden on your computer. For LabVIEW RT systems, log files are located in /ni-rt/nixnet/log or /var/lib/ni-xnet/log.


Complete call chain:
XNET Create Session (Signal Input XY).vi:4640002
CAN_Msg.vi

0 Kudos
Message 8 of 9
(431 Views)

Does anyone have good recommendations for labview communtiy other than this one?

0 Kudos
Message 9 of 9
(419 Views)