Things used in this project

Hardware components:
Tm4c129encpdt
Texas Instruments TM4C Microcontroller
the heart of our drive
×1
Software apps and online services:
Vs2015logo
Microsoft Visual Studio 2015
H5g3etjnacmazg8oq17z
MATLAB
Labview home package neidctwb5w
Digilent LabVIEW Home Bundle
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)

Code

Matlab ExampleMATLAB
Example shows how you can control one HDrive with Matlab Script
t=tcpip('192.168.1.102', 20000, 'NetworkRole', 'client') ; % configure TCP 
fopen(t); % open TCP Connection
fwrite(t, '<HDrive Position=\"200\" Torque=\"50\" Speed=\"10\" Mode=\"4\" />') % send XML drive order
C# ExampleC#
Example shows how to control a motor with C#
TcpClient client = new TcpClient();
 
//create instance from TcpListener Object setup Object to listen on TCP Port 5002
TcpListener listener = new TcpListener(5002);
 
//start the server to listen for new clients
listener.Start();
 
//wait until a client has opened a connection
client = _listener.AcceptTcpClient();
 
//if a client has found, the program continues
Console.WriteLine("client found!" );
 
//create an instance of the C# Stream class and get the Stream to the client
Stream inOut = client.GetStream(); 
 
//Format the XML-Formatted Hdrive order into a byte stream and send it to the Stream
var enc = new ASCIIEncoding();
 
enc.GetBytes("<HDrive Position=\"1000\" Torque=\"50\" Speed=\"10\"  Mode=\"4\" />"); 
inOut.Write(enc, 0, enc.Count);

Credits

A6lcwotv
Chris Henschel

#HenschelRobotics Easy to use #IoT enabled #Servo Drives, Industrie 4.0, #Electronics, embedded systems, #C#, #Maker, 3D Printer, #Matlab, #HDrive

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login