Animation of a 3-Floor Elevator with Arduino Control

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ต.ค. 2024
  • Objectives: to learn serial communication, read and write data in LabVIEW and Arduino
    Here are the steps:
    1. Open this video: • 3 Floor Elevator anima... , download the program file.
    2. Add VISA Configure, VISA Bytes at Port, VISA Read, VISA Write and VISA Close.
    3. In VISA Read, add a Case Structure, and make this VISA Read only run if there is data in the serial port.
    4. Fill bytecount = 10 and add Trim to the read buffer.
    5. In VISA Write, add a Case Structure, and make it so that VISA Write is only executed when the elevator position changes, and the elevator door also changes.
    6. Send 3 pieces of data, namely data on the current position of the elevator, the condition of the elevator whether it is going up or down, and the condition of the door whether it is opening or closing. Combine the three pieces of data with a Concatenate string and put a separator in the form of a comma (","), and end with the Carriage Return character.
    7. Make the door open with the character * and closed with the character #.
    8. Make the Target position also change when the buttons 1, 2 and 3 on the keypad are pressed.
    9. Make the Up/Down Indicator also change when the Target position is larger or smaller compared to the Current position.
    10. After that, run this LabVIEW program. But before running, make sure to select the paired COM port (see Device Manager).
    11. Open this Wokwi: wokwi.com/proj....
    12. Run the Wokwi program. Make sure Wokwi displays the COM port selection dialog box (if it doesn't appear, use the Google Chrome browser). Select the COM port that pairs with the COM port used in LabVIEW.
    For more information, please visit this blog: 5menitbelajarl....
    For the LabVIEW program files in this video, please download here: drive.google.c....
    Note: Between LabVIEW and Wokwi here uses serial communication, which requires a pair of COM ports on the computer. Open Device Manager to view the COM port pairs. If there is no COM port pair, please install the virtual serial port at this link: hhdsoftware.co....
    Then so that Wokwi can connect to the COM port on our computer, please add in the diagram.json section, especially in the parts and connections section, the following code.
    "parts": [
    {"id": "serial","type": "wokwi-serial-port","attrs": {"baud": "9600"}},
    "connections": [
    ["uno:1","serial:RX","",[]],
    ["uno:0","serial:TX","",[]],
    For more details regarding Wokwi's settings, please watch the following video: • How to connect two Ard...

ความคิดเห็น •