Feeds:
Posts
Comments

Sliding mode control is one of the robust control which can handle known uncertainties. It works by forcing the output state trajectory of the system towards our predefined sliding surface, so that it will slide on our surface in subsequent time. You can download the presentation file here, the title is “Simulation and Implementation of Servo Motor Control with Sliding Mode Control (SMC) using Matlab and Labview”.

The Matlab file will not be shared, I think the simulation is not difficult you can write in S-Function or by calling ODE solver from m-file. LabView source code can be seen (seeing source code or reading it :D) in the presentation file. I hope It is useful for the sake of education, sharing knowledge to the world -at least this is what I can do for now :(, hope I could give something useful to human being before I die-. Btw, if there’s something wrong with the equation please let me know. Oh and..don’t expect too much from the presentation file, I only did this less than 2 weeks, plus I am new to LabView and Matlab S-Function T_T.

After the encoder is installed to the motor I will post the video here, insyaAllah. Hope It will not take too much time for the experiment.

Updated 2008-05-07:

I did the experiment last february 2008, just able to upload it now caused by my laziness :D. I forgot to add in the presentation file, the inverter input is only positive DAC value from 0 to 10 V. Thus, if the control output is negative you need to make additional circuit to switch the direction (from forward to reverse, vice versa). (Look at my posting about the “Basic Switching Circuit”), also for safety you must add switches and hardwired to the inverter. Here are the setup and the video: Continue Reading »

Advertisements

Another basic article. My first time with LabView Real-Time. I decided to write a program to control an R/C servo motor with LV-RT. With PXI-7358, I decided to use the digital I/O, just by turning on and off the port according to the time constraint. I did not read the manual in detail, so I am afraid I missed something, but when I did a test how long the time took for turning the digital port from on to off was around 1.5 ms, and from on to off took 250 uS. It means that it is not possible to drive the R/C servo with digital I/O when the pulse needed should be between 200-2500 uS.

Here’s the code when I did a measurement on the time of digital I/O switching on-off: Continue Reading »

Again, still LabVIEW beginner. 🙂 I am currently reading an ebook titled “LabVIEW based Advanced Instrumentation System” by S. Sumanthi and P. Surekha, and IMHO this is a good book for beginner. I wish I could finish reading this book as soon as possible, because time is what I do not have 😦

Two days ago, I tried to control a stepper motor with ULN2803 and LabVIEW. FYI -again- I am new to LabVIEW, so don’t expect too much from this article. I have NI-PCI 6221 and NI-PXI 7358 with me, the later is specifically manufactured for motion controller but still it has the digital I/O. And in this article I am using the motion controller digital I/O to control the stepper, if you only have DAQmx you also still can use it to drive your stepper motor, because to control stepper motor only need digital output which you can generate from your DAQmx.

Here’s the LV source code:

Continue Reading »

Yesterday, I tried to control a stepper motor using the L297 IC driver, but then I realized that I need another IC which could drive high current to the motor, similar to darlington transistor arrays. The ICs are being purchased at the moment for the need of lab experiment taught by my friend.

Oh well, I decided to learn how to generate a simple PWM in PCI-6221 on LabView -as you know I am always new in this, too many functions available, and I am not used to graphical programming-.

I utilized the counter 0 (DevX/ctr0) to turn on a LED (light emitting diode) that it will flicker according to the signal given. For this card the LED is located on PFI 12 (pin number 2).

Here is the front panel, where user can interact with the program: Continue Reading »

I am writing this while waiting for my “Robot Analysis” class at 11 am. Any of you who has basic knowledge about robotics, especially the kinematics must has ever heard the word Denavit-Hartenberg transformation. Well, I am not going to write about this method, but the other method which was AFAIK found the latest around 1971, if I am not mistaken.

I am not going to explain the whole theory, I will just show you the homework and Matlab program that I wrote for this transformation type. In Screw transformation, the reference and final point is arbitrarily chosen, this makes this method different to DH method.

Ok. Here’s the question:

HW11_CH2

Here’s the answer: Continue Reading »

AFAIK, NI provides three ways of programming for the instruments they produce, they are:

  1. LabView, a graphical based programming
  2. LabWindows/CVI, a GUI programming based on C language
  3. Object Oriented Programming based language (C++, I am using MSVS2005)

You can see my desktop of these 3 “programming style:” Continue Reading »

Old memory :)

Old memory, I learned assembly first time when I were in Senior High School, 2nd grade. I learned how to write a .com program using debug. And now, after several struggle I managed to dig in my brain and wrote the tiny program 🙂

C:\>DEBUG
-A 100
0B32:0100 MOV AH,02
0B32:0102 MOV DL,41
0B32:0104 MOV CL,1A
0B32:0106 INT 21
0B32:0108 INC DL
0B32:010A LOOP 106
0B32:010C INT 20H
0B32:010E
-RCX
CX 0000
:E
-N C:\ABC.COM
-W
Writing 0000E bytes
-G
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Program terminated normally
-Q

C:\>DIR ABC.COM
Volume in drive C is WINDOWS
Volume Serial Number is C012-9F20

Directory of C:\

09/10/2007 06:12 PM 14 ABC.COM
1 File(s) 14 bytes
0 Dir(s) 11,225,669,632 bytes free

C:\>ABC
ABCDEFGHIJKLMNOPQRSTUVWXYZ
C:\>

I cannot remember which service interrupt used to put a single character into screen, well, here’s the reference:

Category: DOS kernel

INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT

	AH = 02h
	DL = character to write
Return: AL = last character output (despite the official docs which state
		nothing is returned) (at least DOS 2.1-7.0)
Notes:	^C/^Break are checked, and INT 23 executed if pressed
	standard output is always the screen under DOS 1.x, but may be
	  redirected under DOS 2+
	the last character output will be the character in DL unless DL=09h
	  on entry, in which case AL=20h as tabs are expanded to blanks
	if standard output is redirected to a file, no error checks (write-
	  protected, full media, etc.) are performed
SeeAlso: AH=06h,AH=09h

~Still remembering the first time I cracked a commercial software =P, lol, it was fun. Thx for the tutorial writer, sorry I forgot your name =D