TReX DMC01- Initial programming in LabView

Hello,

I am trying to control a Brushed DC motor (131:1 Metal Gearmotor 37Dx57L mm with 64 CPR Encoder) using LabView. I am Using a RS-232 Cable serial connection. I will be using a CompactRIO(sine.ni.com/nips/cds/view/p/lang/en/nid/208800).

I am not using the encoder of the motor at the moment. I Could understand from the reference guides that i could control the motor by just using the RS-232 Serial cable without any input analogue signals. The motors did work when i connected it using the TReX configuration utility program given within the resource. It Would be really helpful if anyone Could help me with the program to control the LabView.

Kind Regards,

Hi.

Unfortunately we are not very familiar with LabVIEW, so we can’t offer any help with programming in it. However, a good way to get started would be to first figure out how to send bytes to a serial port with LabVIEW by reading NI’s documentation, and then learn what bytes you want to send to the TReX by reading its user’s guide, and put the two together. This vi that was made by a community member for controlling one of our other products (the Maestro USB Servo Controller) might be helpful.

-Claire

BrakeMotor_rs232.vi (22.7 KB)

Hello ,

I have got the motor running. I have an initial VI. I am using serial connection (RS-232) and the compact protocol for sending commands. please find the attached vi.

Also does anyone have the Matlab code or C-code for setting the motor speed and reading current using serial communication (RS-232).

Thank you

Thank you for posting your vi! I do not know of any MATLAB code for the TReX, but we have a sample C# program that communicates with the TReX though serial that might be helpful.

-Claire

Hello Claire,

Thank you so much. That was helpful. i could make the logic from tht.