12-13-2023 04:08 AM
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.
The solution I tried:
12-13-2023 05:29 AM
Hi!
Do rightclick -> create constant on the input terminal of the signal write VI. This shows what datatype is expected:
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.
12-13-2023 07:00 AM - edited 12-13-2023 07:16 AM
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
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..
How could I modify it?
12-13-2023 08:37 AM
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.
12-14-2023 02:46 AM
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
BD
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.
12-20-2023 08:28 AM
follow up
12-20-2023 09:08 AM
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?
12-20-2023 09:24 AM
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
12-22-2023 04:18 AM
Does anyone have good recommendations for labview communtiy other than this one?