VS Code Extension - Loading Programs | MUSE
In this video, you’ll learn how to upload and download program files between Visual Studio Code and an AMX MUSE controller using the MUSE extension. We’ll walk through opening program folders, connecting to a controller, and transferring files using the built-in tools. You’ll also see how to manage multiple controllers and ensure your programs are properly deployed and running as expected. By the end, you’ll be able to efficiently move code between your development environment and live systems with confidence.
What You’ll Learn:
• Uploading and downloading program files with the MUSE VS Code extension
• Opening and managing program folders in VS Code
• Connecting to one or more MUSE controllers
• Transferring files using built-in extension tools
• Verifying program deployment and execution status
• Best practices for managing code across multiple systems
• Streamlining development-to-deployment workflows
Hello, and welcome to this video on transferring program files with the MUSE extension for VSCode. The extension is the only way to load or retrieve high code from the MUSE controller. For this example, we have a simple script called Serial Port Example that we will upload to the controller. If you need assistance creating MUSE programs or adding MUSE controllers to VSCode, please reference our previous videos in this series.
To begin, open VSCode and click on the File dropdown menu. Select Open Folder from the menu and browse to your MUSE program folder. Click on the folder and press the Select folder button at the bottom right-hand side of the window.
Next, login to the MUSE controller you want to upload the program to. Click the login to muse controller button, press the login button at the bottom right, and put in your credentials at the top of the screen. Now that we are connected to the controller, we can upload our program.
In the file explorer portion of VSCode, right-click on the empty space around the file names and select Upload to MUSE controller from the context menu. It’s important to note, since this is a context menu, clicking on the file name itself will not work. You must click on the empty space of the file explorer area.
After you click Upload to MUSE controller, a dialogue window will appear at the top of the screen asking you to select the controller you want to send the program to. Each controller you are connected to will be shown in this list. This allows you to send code to more than one controller at a time if you are connected to multiple devices.
Make sure the controllers you want to send the program to are checked and then click the OK button.
The next option is to choose what program you want to be loaded to the controller. Your program will be selected by default. Click the OK button to proceed.
The program will now be uploaded to the controller. You can see at the bottom right-hand side of VSCode that the program has uploaded successfully, and if you expand out the programs list on the controller you will see the program listed there as well.
A green checkmark to the left of the program’s name means the program is running. Also, to the right of the program name you will see it is enabled and detached. We will talk about attaching to programs in another video.
Keep in mind that all files located in the MUSE program folder will be uploaded to the controller. For this reason, it is important to remember that only program files should be in the program folder. Things like touch panel files should be saved elsewhere.
Now that we have a program loaded to this controller, let’s see about downloading it from the controller. The first step is to open a blank folder in VSCode by going to File and then Open Folder. Browse to where you want to save your downloaded code and click Select folder.
Next, login back into the MUSE controller. Notice that each time we change folders, the connection to the MUSE controller is reset. This is to ensure that no programs are accidentally loaded to the wrong controller.
Once you are connected, right-click on the empty space in the explorer section and select Download from MUSE controller.
In the dialogue box at the top, click the controller you want to download from in the list of connected controllers, and in the next dialogue option click on the name of the program you want to download.
The extension will now download all the files associated with that program. They should appear in the file explorer section of VSCode when it is done.