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.
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.
Introduction
This VI shows that you can manually place a USB-LIN device in sleep and active mode. This example also shows how you can use another LIN device to wake up a sleeping LIN device.
In order to manually place a USB-LIN device in sleep mode, you have to call the ncSetAttr.vi and indicate that the device should be in an active or sleep mode. I have implemented this in a custom VI, USB-LIN Sleep Control_LV86.vi. This subVI is used in the following images to implement this functionality.
Here is a quick example of waking a LIN device from sleep mode. We are using the USB-LIN Sleep Control_LV86.vi to place the Master device in a sleep mode. Then we will be using a second USB-LIN device to wake the Master LIN device. Here is the necessary setup:
- two USB-8476s
- first USB-8476 runs LIN Master Send Header Frame Respond and Receive_LV86.vi
- second0 USB-8476 runs LIN Master Send Header Frame and Receive_LV86.vi
Perform the following operations:
Step 1: Choose the interface.
Step 2: Press the VI's run button.
Step 3: Choose the other interface.
Step 4: Press the other VI's run button.
Step 5: Press the Update LIN Response Entry Frame? button.
Step 6: Press the Write Header Frame button and noticed the results in the table.
Step 7: Press the Write Header Frame button and noticed the results in the table.
Step 8: Press the Sleep? button and noticed that the Is asleep? indicator shows you that the LIN device is asleep.
Step 9: Press the Write Header Frame button and noticed the LIN BUS Error, which indicates the Master received the message as a wake-up but did not interpret the message. Also notice that the Is asleep? indicator is no longer lit as the Master is awake.
Step 10: Press the Write Header Frame button and noticed the results in the table.
LIN Master Send Header Frame Respond and Receive_LV86.vi:
LIN Master Send Header Frame and Receive_LV86.vi:
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
"These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is 1-D array of
unsigned byte [8-bit integer (0 to 255).
The type of the sink is void."
How can I solve this error message ? kindly help !!
the download docment can not run because of the lack of the subvi.so how can i get the subvi document? thanks