These commands are necessary after booting up the robot so it is a good idea to always include them at the start of any program. Note that in the program, I use the CustomCommand subVI to send all my commands to the robot. The first section of the sequence is the setup.
This sequence structure is there for better readability and could be omitted. Inside the while loop, we have a case structure for when the button is pressed. The while loop is there to keep the connection alive until the user ends the program. The connection is then sent inside the while loop. The IP address is 192.168.0.100 and the port is the control port 10000. This is the first section before the while loop opens the connection to the robot. If the button is pressed again, the robot goes through the cycle one more time. This example is a simple program where a button is pressed and the robot is activated, homed, and then performs a predetermined move. The only requirement is to follow the formatting from the Programming Guide. The user can create their own subVIs for any command required. They simply take the inputs and add them to a string with the proper command and format and send them through the TCP Write block. These three commands take into inputs either a joint or TCP pose depending on the block. It simply concatenates the command with the \x00 ending and sends it through the TCP Write block. The custom command subVI simply allows the user to send any command that can be found in the programming manual. These subVIs always take as an input a TCP Connection, which is output from the TCP Open Connection block, and a Boolean input which serves as a trigger to send the command. These 4 subVIs can be used to create almost any program and can be modified if the user wants to add some functionalities.
These subVIs can be used to send commands to the robot but do not monitor for a response. For safety reasons, the robot will pause if the connection is broken or closed.įor convenience, some subVIs have been created by us to facilitate the use of the Meca500 in LabVIEW. One thing to note is that the connection must be kept open while the robot completes a command. The write and read functions can be called as many times as needed once the connection has been opened. Then, with either a loop or a sequence, the write function is called to send commands to the robot. The default IP address is 192.168.0.100 and the control port is 10000. They can be found in the Data Communication > Protocols > TCP section of the function palette.Ī typical way to use these functions is to first open a connection to the robot. In LabVIEW, there are TCP/IP communication blocks that enable simple communication. This is true for most commands, except velocity control commands which are executed right away. If a command is sent before the previous one is completed, it is stored inside the internal queue of the robot and will be executed right after the previous command. This port can be used to monitor various things on the robot such as the joint pose, end effector pose, and robot status.ĭetails can be found in the programming manual.ĭepending on the type of application, the user might want to queue commands or send them only when needed. The robot also has a monitoring port that sends info about the robot at a fixed rate. Some commands return a value when the movement is complete, others can be immediate such as with a status request. The “\x00” at the end is the null ascii character that is used to signal to the robot that the command has ended.
The list of commands can be found in the programming manuals available on the Mecademic Support site. The Meca500 robot can receive commands in the form of: The user simply has to build the messages and send them through the TCP write block function. LabVIEW supports this type of communication and is fairly easy to use. The Meca500 robot communicates primarily through TCP/IP communication.