![]() PWM pin will be used to control the speed of Motor. Place 2 “Digital Write Pin” and 1 “PWM Write Pin” Block as follows.We need 2 digital write pins to control direction of motor in 2 different directions (left and right). ![]() ![]() Draw a rectangle on LabVIEW “Block Diagram” and click on red color round icon “loop condition” Create a constant by right clicking on it.Click on white space on LabVIEW “Block Diagram” and follow “Structure → select While loop”.Third input is “Board Type”, fourth is “Bytes per packet” and fifth is “Connection type” make them also constant.Right click on “Baud Rate” then “create” and then “constant”. Create it as constant as done for “VISA resource”. Select appropriate one after checking from device manger as mentioned above otherwise it won’t work. Click on arrow it will show available option.As it will be a constant value of Port which will be always used for serial communication. Bring cursor on first input of “Init” until it shows “VISA resource”.You can find it in “device manager” of your computer under “ports (COM & LPT)….” Make sure Arduino board is connected with computer otherwise it won’t be shown. It is the serial port you are using for interfacing of Adruino. Bring Cursor to anywhere in LabVIEW “Block Diagram” panel and place the “Init”.This will add Initializations of Arduino board. In this section we will write LabVIEW Program to control the speed and direction of DC motor. LabVIEW Program to Control the Speed and Direction of DC Motor:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |