Hello,
I am new to matlab, so help me out a bit here. I have a 3 axis controller (X,Y,Z) that I am trying to program using Matlab via RS232. So I know how to open the port and set the settings to the port. What I don't know, or I am having trouble understanding is how to send the commands to control each axis. According to the manufacturer the command to set the output for the X,Y and Z axis are XV, YV, and ZV. I know I can use the fprintf to write data in the ucontroller,, but how do you tell it to output lets say XV = 10 to move the X axis to that point. Is this even possible in matlab?. Thanks in advance.
s = serial('COM1')set(s, 'BaudRate', 115200)set(s, 'DataBits', 8)set(s, 'Parity', 'none')set(s, 'StopBits', 1)set(s, 'FlowControl', 'none')fopen(s)
Best Answer