07-16-2019 04:03 AM
Hello, I am using the simulate LIN network - master transmit VI that TroyK built. I was wondering if it is possible to drive two channels of the Vector VN1640 hardware at the same time. Has anyone done this before or know if it is possible?
Thanks.
Solved! Go to Solution.
07-16-2019 06:11 PM
The LIN network master transmit VI can already do this can't it? That's why the "Responding Slaves" control is an array.
You just need to make sure you have the correct piggies loaded in the channels.
Or are you talking about having multiple simultaneous master nodes? You can do that too, you just need to code it.
Ref: Simulate LIN network -master transmit.vi 108 KB
07-16-2019 11:25 PM
Thanks for your quick response. Yes, I am talking about simultaneous master nodes on up to 4 channels. I am still quite new to LabView, but after looking at you code I would assume that by adding another channel configuration cluster element to the build array function in the Init state, that this would be the way to go. Also creating a for loop around the code in the SetMaster state and indexing to the number of masters should make it work, or I am missing something fundamental?
I would really appreciate you reply on this.
07-17-2019 01:22 AM - edited 07-17-2019 01:23 AM
It sounds like you know what to do with the LabVIEW part, just make sure you also understand what is needed by the vxlapi part.
I'm guessing that you will only want a transmit to come out of one master. That means you have to use it's specific access mask, not a combined one.
07-18-2019 02:31 AM
Could you specify what you mean when you say " understand what is needed by the vxlapi part"?
No, I want the same data to come out of both masters at the same time, because I am driving 2 parts that should do the same thing.
What I am ultimately trying to do is drive two master channels with the same data. I am also trying to change the data that the masters are transmiting, dynamically. This means that I get my ID and Data from another VI while the Bus is running. So that when new data is incoming, I need to overwrite the data that is in the master transmit data array with the new data and let the bus run.
I would really appreciate if you could point me in the right direction to solve this problem, without messing with the bus to much. I've been trying to create a solution for almost a week now with no real success.
Thanks in advance!
07-18-2019 05:48 PM
@alexkon wrote: Could you specify what you mean when you say " understand what is needed by the vxlapi part"?
The API needs functions to be called in the right sequence with the right input parameters. The best way to know how to do it is to read and understand what this is in the "XL Driver Library - Description.pdf" document that comes when you install the library.
I found the flowcharts section most helpful to get the sequence correct and then the description of the individual functions to get the input parameters correct.
For LIN it's at API document pdf > 6 LIN Commands > 6.2 Flowchart
Here is an image of what it looks like at the moment...
Other than a good understanding of how LIN and LIN slave simulation actually work, that should be everything you need. There is a bit of a learning curve but there is no substitute for understanding it. (Unless you have a contractor write and maintain the code for you.)
03-11-2025 01:51 AM
Hello, I am Using vector VN1670 tool to communicate with 15 devices simultaneously. Anyone can help me to read data simultaneously from 15 channels? Is there any labview example vi ?
03-11-2025 04:05 PM
I don't think there is any LabVIEW example for communicating with a VN1670.
It's a fairly new device and the example code here is currently about 5 years old, so it wouldn't recognize the device.
[Vector XL Driver - LabVIEW wrappers]
The Vector VN1670 device has 10 permanently installed transceivers, 5 CAN and 5 LIN. What combination of buses are you intending to use?
CAN and LIN channels can't be grouped into a single port, so it would be impossible to run all 15 channels in a single thread.
You would have to:
What have you got so far? It's easier to help if you attach your code.