From: Walter Fetter Lages Date: Sun, 20 May 2018 04:28:40 +0000 (-0300) Subject: Fix bug in initializaiton of AIC_CAN and AIC_HOST_CAN. X-Git-Tag: v1.4.0^0 X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=aa73ef6eb8e6f2856c3094528cfb0506ae14b448;p=aic.git Fix bug in initializaiton of AIC_CAN and AIC_HOST_CAN. Corrigido bug nas inicializacao das classes AIC_CAN e AIC_HOST_CAN que violava o padrao ISO C++ e impedia estas classes de serem compiladas com o g++ 3.4.3. --- diff --git a/Changes b/Changes index a689b81..0edc0ef 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,4 @@ -2004.12.05 Corrigido bug nas inicializacao das classes AIC_CAN e - AIC_HOST_CAN que violava o padrao ISO C++ e impedia estas - classes de serem compiladas com o g++ 3.4.3. +2004.11.29 Criada versao 1.4.0 2004.09.28 Alterados os nomes das classes utilizadas para sinalizar excecoes. Foram removidos os prefixos que podem ser diff --git a/IODaemon/IODaemon.java b/IODaemon/IODaemon.java index 470e3f6..023354f 100644 --- a/IODaemon/IODaemon.java +++ b/IODaemon/IODaemon.java @@ -100,7 +100,7 @@ class IODaemon extends Thread } try { - aic=new AIC(BASE,24.0,20e3,8192); + aic=new AIC(BASE,24.0,20e3,2000); if(udp) host=new HostUDP(args[hostarg],Integer.parseInt(args[hostarg+1])); else host=new HostCAN(Integer.parseInt(args[hostarg])); SendSensors sendSensors=new SendSensors(); diff --git a/Makefile b/Makefile index 0d112af..d9f8ca6 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ PACKAGES= doc \ JointTest \ MotorReset \ MotorTest \ - PIDDaemon \ StrobeTest \ aicd \ braketst \ diff --git a/PIDDaemon/Makefile b/PIDDaemon/Makefile deleted file mode 100644 index 4f158c5..0000000 --- a/PIDDaemon/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -CLASSPATH=-classpath /opt/tini/bin/tini.jar:/opt/tini/bin/tiniclasses.jar -APIDBPATH=-d /opt/tini/bin/tini.db -JAVAFLAGS=-O -target 1.1 -source 1.3 -ASMINC=-I/opt/tini/native/lib -ASMOPT=-f 1.14 -p 390 -l -ASMMACRO=/opt/tini/native/bin/Linux/macro -ASM=/opt/tini/native/bin/Linux/a390 -CC=sdcc -CFLAGS=-mTININative -S - -all: PIDDaemon.tini - -PIDDaemon.class: PIDDaemon.java - javac ${CLASSPATH} ${JAVAFLAGS} PIDDaemon.java - -pid.mpp: pid.a51 - ${ASMMACRO} ${ASMINC} -e- pid.a51 - -globals.mpp: globals.a51 - ${ASMMACRO} ${ASMINC} globals.a51 - -pid.tlib: pid.mpp globals.mpp - cat pid.mpp globals.a51 > lout.mpp - ${ASM} ${ASMOPT} lout.mpp - mv lout.tlib pid.tlib - mv lout.lst pid.lst - -pid.a51: pid.c - ${CC} ${CFLAGS} pid.c - -PIDDaemon.tini: PIDDaemon.class pid.tlib - java ${CLASSPATH} TINIConvertor -n pid.tlib -f PIDDaemon.class ${APIDBPATH} -o PIDDaemon.tini - - -clean: - rm -f *.bak *~ PIDDaemon.class pid.tlib pid.mpp pid.lst pid.a51 globals.mpp lout.mpp lout.lst - -distclean: clean - rm -f PIDDaemon.tini - diff --git a/PIDDaemon/PIDDaemon.java b/PIDDaemon/PIDDaemon.java deleted file mode 100644 index b959ecf..0000000 --- a/PIDDaemon/PIDDaemon.java +++ /dev/null @@ -1,63 +0,0 @@ -/****************************************************************************** - - Actuator Interface Card - PID Daemon - User Interface Module - Copyright (C) 2004 Walter Fetter Lages - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - You can also obtain a copy of the GNU General Public License - at . - -*******************************************************************************/ - -import com.dalsemi.system.*; - -public class PIDDaemon -{ - public static native int start_rt_timer(int period); - public static native void stop_rt_timer(); - - public static void main(String[] args) - { - System.out.println("PID Daemon"); - System.out.println("Copyright (C) Walter Fetter Lages, 2004.\n"); - - int ms=10; - - System.out.print("Loading native library..."); - System.loadLibrary("pid.tlib"); - System.out.println("done."); - - System.out.print("Starting real-time timer..."); - int period=start_rt_timer(ms); - System.out.println("done. Effective period: "+period); - - System.out.print("Running PID..."); - long time0=TINIOS.uptimeMillis(); - long time=0; - while(time >=0) - { - time=TINIOS.uptimeMillis()-time0; - System.out.println("t="+time); - } - System.out.println("...done."); - - System.out.print("Stoping real-time timer..."); - stop_rt_timer(); - System.out.println("done."); - } -} diff --git a/PIDDaemon/globals.a51 b/PIDDaemon/globals.a51 deleted file mode 100644 index d27c7ca..0000000 --- a/PIDDaemon/globals.a51 +++ /dev/null @@ -1,29 +0,0 @@ -;****************************************************************************** -; -; Actuator Interface Card -; PID Daemon -; Real Time Module Global Variables -; Copyright (C) 2004 Walter Fetter Lages -; -; This program is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program; if not, write to the Free Software -; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -; -; You can also obtain a copy of the GNU General Public License -; at . -; -;*******************************************************************************/ - - -counter: db 0,0,0,0 - end diff --git a/PIDDaemon/pid.c b/PIDDaemon/pid.c deleted file mode 100644 index 5c7d766..0000000 --- a/PIDDaemon/pid.c +++ /dev/null @@ -1,83 +0,0 @@ -/****************************************************************************** - - Actuator Interface Card - PID Daemon - Real Time Module - Copyright (C) 2004 Walter Fetter Lages - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - You can also obtain a copy of the GNU General Public License - at . - -*******************************************************************************/ - -#define RTIME long - -RTIME Native_start_rt_timer(void) _JavaNative -{ - volatile long period = NatLib_LoadInt(0); - - _asm - - mov T2CON,#00h ; clear TR2 = disable timer 2 - anl IE,#0dfh ; clear ET2 = disable timer 2 interrupt - - mov dps,#1 - mov dptr,#count - mov a,#2bh ; timer 2 - call System_InstallInterrupt - mov dps,#00h - - anl CKCON,#0dfh ; clear T2M = timer 2 uses clock/12 - mov T2MOD,#00h ; clear DCEN = counts up only - -; TINI oscillator is 18432000 => counter=0c400h=100Hz - mov RCAP2L,#00h ; count reload LSB - mov TL2,#00h ; count LSB - mov RCAP2H,#0c4h ; count reload MSB - mov TH2,#0c4h ; count MSB - - orl IP,#20h ; set PT2 = set timer 2 interrupt to high priority - orl IE,#20h ; set ET2 = enable timer 2 interrupt - - mov T2CON,#04h ; set TR2 = enable timer 2 - _endasm; - - return period; -} - -void Native_stop_rt_timer(void) _JavaNative -{ - _asm - mov T2CON,#00h ; clear TR2 = disable timer 2 - anl IE,#0dfh ; clear ET2 = disable timer 2 interrupt - anl IP,#0dfh ; clear PT2 = set timer 2 interrupt to normal priority - _endasm; -} - -static void int2ack(void) -{ - _asm - anl T2CON,#7fh ; clear TF2 = clears timer 2 overflow - _endasm; -} - -static void count(void) interrupt -{ - int2ack(); - - counter++; -} diff --git a/README b/README index 7d64c07..1e5c8fb 100644 --- a/README +++ b/README @@ -1,3 +1,7 @@ + Actuator Interface Card + +aic-1.*.* based on TINI + Em funcao de alteracos no protocolo de aplicacao, os programas desta versao que utilizam comunicacao nao sao compativeis com os correspondentes das versoes anteriores a 1.2.0. Assim, os daemons que estejam instalados na AIC diff --git a/doc/Makefile b/doc/Makefile index 45f72e5..90a6e82 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -63,7 +63,7 @@ clean: distclean: clean rm -f aic.ps aic*.pdf aic.dvi aic.net aic.bom aic.bpp aic.xrf - rm -r html + rm -rf html update: $(SCHEMS) gschupdate $(SCHEMS) diff --git a/doc/javadocs/allclasses-frame.html b/doc/javadocs/allclasses-frame.html deleted file mode 100644 index 789869d..0000000 --- a/doc/javadocs/allclasses-frame.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -All Classes - - - - - - -All Classes -
- - - - - -
AIC -
-Brake -
-CtrlRegister -
-Encoder -
-Host -
-HostCAN -
-HostUDP -
-Index -
-Motor -
-PLD -
-PWM -
-
- - - diff --git a/doc/javadocs/allclasses-noframe.html b/doc/javadocs/allclasses-noframe.html deleted file mode 100644 index 425e265..0000000 --- a/doc/javadocs/allclasses-noframe.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -All Classes - - - - - - -All Classes -
- - - - - -
AIC -
-Brake -
-CtrlRegister -
-Encoder -
-Host -
-HostCAN -
-HostUDP -
-Index -
-Motor -
-PLD -
-PWM -
-
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/AIC.html b/doc/javadocs/br/ufrgs/eletro/AIC/AIC.html deleted file mode 100644 index c711891..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/AIC.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - -AIC - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class AIC

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.AIC
-
-
-
-
public class AIC
extends java.lang.Object
- -

-Provides access to all devices in an Actuator Interface Card -

- -

-

-
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
-
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - -
-Field Summary
- br.ufrgs.eletro.AIC.Brakebrake - -
-          Brake actuaded by AIC
- br.ufrgs.eletro.AIC.Encoderencoder - -
-          Encoder read by AIC
- br.ufrgs.eletro.AIC.Indexindex - -
-          Sync-switch read by AIC
- br.ufrgs.eletro.AIC.Motormotor - -
-          Motor actuated by AIC
-  - - - - - - - - - - -
-Constructor Summary
AIC(int base, - double vm, - double freq, - int np) - -
-          Initializes an AIC
-  - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidfinalize() - -
-          Finalizes an AIC
- voidoff() - -
-          Turns an AIC off
- voidon() - -
-          Turns an AIC on
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-motor

-
-public br.ufrgs.eletro.AIC.Motor motor
-
-
Motor actuated by AIC -

-

-
See Also:
Motor
-
-
- -

-encoder

-
-public br.ufrgs.eletro.AIC.Encoder encoder
-
-
Encoder read by AIC -

-

-
See Also:
Encoder
-
-
- -

-brake

-
-public br.ufrgs.eletro.AIC.Brake brake
-
-
Brake actuaded by AIC -

-

-
See Also:
Brake
-
-
- -

-index

-
-public br.ufrgs.eletro.AIC.Index index
-
-
Sync-switch read by AIC -

-

-
See Also:
Index
-
- - - - - - - - -
-Constructor Detail
- -

-AIC

-
-public AIC(int base,
-           double vm,
-           double freq,
-           int np)
-
-
Initializes an AIC -

-

Parameters:
base - Base address for on board devices
vm - Motor Voltage
freq - PWM frequency
np - Pulses per encoder revolution
- - - - - - - - -
-Method Detail
- -

-on

-
-public void on()
-
-
Turns an AIC on -

-

-
-
-
-
- -

-off

-
-public void off()
-
-
Turns an AIC off -

-

-
-
-
-
- -

-finalize

-
-public void finalize()
-
-
Finalizes an AIC -

-

-
Overrides:
finalize in class java.lang.Object
-
-
-
-
-
- -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/Brake.html b/doc/javadocs/br/ufrgs/eletro/AIC/Brake.html deleted file mode 100644 index fb834c2..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/Brake.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - -Brake - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class Brake

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.Brake
-
-
-
-
public final class Brake
extends java.lang.Object
- -

-Provides access to electromagnetic brake in an Actuator Interface Card -

- -

-

-
Version:
AIC-1.3.0
- -
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
-
- -

- - - - - - - - - - - - - - - - -
-Constructor Summary
Brake(int base) - -
-          Initializes Brake.
-  - - - - - - - - - - - - - - - -
-Method Summary
-static voidapply() - -
-          Applies the electromagnetic brake
-static voidrelease() - -
-          Releases the electromagnetic brake
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - - - - -
-Constructor Detail
- -

-Brake

-
-public Brake(int base)
-
-
Initializes Brake. Loads the corresponding native library. -

-

Parameters:
base - Base address for on board devices
- - - - - - - - -
-Method Detail
- -

-apply

-
-public static void apply()
-
-
Applies the electromagnetic brake -

-

-
-
-
-
- -

-release

-
-public static void release()
-
-
Releases the electromagnetic brake -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/CTRL.html b/doc/javadocs/br/ufrgs/eletro/AIC/CTRL.html deleted file mode 100644 index bef561a..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/CTRL.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - -CTRL - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class CTRL

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.CTRL
-
-
-
-
public class CTRL
extends java.lang.Object
- -

-Provides bitmap constants for the control register in an Actuator Interface Card -

- -

-

-
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
-
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - -
-Field Summary
-static intBRAKEAPPLY - -
-          Apply Brake
-static intBRAKERELEASE - -
-          Release Brake
-static intPWMDISABLE - -
-          PWM disable
-static intPWMENABLE - -
-          PWM enable
-  - - - - - - - - - - -
-Constructor Summary
CTRL() - -
-           
-  - - - - - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-PWMDISABLE

-
-public static final int PWMDISABLE
-
-
PWM disable -

-

-
See Also:
Constant Field Values
-
-
- -

-PWMENABLE

-
-public static final int PWMENABLE
-
-
PWM enable -

-

-
See Also:
Constant Field Values
-
-
- -

-BRAKEAPPLY

-
-public static final int BRAKEAPPLY
-
-
Apply Brake -

-

-
See Also:
Constant Field Values
-
-
- -

-BRAKERELEASE

-
-public static final int BRAKERELEASE
-
-
Release Brake -

-

-
See Also:
Constant Field Values
-
- - - - - - - - -
-Constructor Detail
- -

-CTRL

-
-public CTRL()
-
-
- - - - -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/CtrlRegister.html b/doc/javadocs/br/ufrgs/eletro/AIC/CtrlRegister.html deleted file mode 100644 index e356079..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/CtrlRegister.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - -CtrlRegister - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class CtrlRegister

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.CtrlRegister
-
-
- -

-

-
public class CtrlRegister
extends java.lang.Object
- -

-Provides constants for using the control register in an Actuator Interface Card -

- -

-

-
Since:
AIC-1.2.0
- -
Version:
AIC-1.3.0
- -
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
-
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - -
-Field Summary
-static intBRAKEAPPLY - -
-          Deprecated. Apply Brake
-static intBRAKERELEASE - -
-          Deprecated. Release Brake
-static intPWMDISABLE - -
-          Deprecated. PWM disable
-static intPWMENABLE - -
-          Deprecated. PWM enable
-  - - - - - - - - - - -
-Constructor Summary
CtrlRegister() - -
-          Deprecated.  
-  - - - - - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-PWMDISABLE

-
-public static final int PWMDISABLE
-
-
Deprecated. 
PWM disable -

-

-
See Also:
Constant Field Values
-
-
- -

-PWMENABLE

-
-public static final int PWMENABLE
-
-
Deprecated. 
PWM enable -

-

-
See Also:
Constant Field Values
-
-
- -

-BRAKEAPPLY

-
-public static final int BRAKEAPPLY
-
-
Deprecated. 
Apply Brake -

-

-
See Also:
Constant Field Values
-
-
- -

-BRAKERELEASE

-
-public static final int BRAKERELEASE
-
-
Deprecated. 
Release Brake -

-

-
See Also:
Constant Field Values
-
- - - - - - - - -
-Constructor Detail
- -

-CtrlRegister

-
-public CtrlRegister()
-
-
Deprecated. 
- - - - -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/Encoder.html b/doc/javadocs/br/ufrgs/eletro/AIC/Encoder.html deleted file mode 100644 index 897553b..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/Encoder.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - -Encoder - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class Encoder

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.Encoder
-
-
-
-
public final class Encoder
extends java.lang.Object
- -

-Provides access to incremental encoder in an Actuator Interface Card -

- -

-

-
Version:
AIC-1.3.0
- -
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
-
- -

- - - - - - - - - - - - - - -
-Field Summary
- intPULSES - -
-          Number of pulses per revolution of the encoder, considering the - quadrature decoder
-  - - - - - - - - - - -
-Constructor Summary
Encoder(int base, - int pulses) - -
-          Initializes Encoder, clears the counter on the quadrature decoder chip
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
-static voidclear() - -
-          Clears the counter on the quadrature decoder chip
- voidfinalize() - -
-          Finalizes Encoder
-static intgetCount() - -
-          Gets the count on the quadrature decoder chip
-static intgetCountAndClear() - -
-          Gets the count and clears the counter on the quadrature decoder chip
- doubleread() - -
-          Reads the counter on the quadrature decoder chip and converts the motion - to radians
- doublereadAndClear() - -
-          Reads the counter on the quadrature decoder chip, converts the motion - to radians and clears the counter
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-PULSES

-
-public final int PULSES
-
-
Number of pulses per revolution of the encoder, considering the - quadrature decoder -

-

-
-
- - - - - - - - -
-Constructor Detail
- -

-Encoder

-
-public Encoder(int base,
-               int pulses)
-
-
Initializes Encoder, clears the counter on the quadrature decoder chip -

-

Parameters:
base - Base address for on board devices
pulses - Number of pulses per revolution of the encoder, considering the - quadrature decoder
- - - - - - - - -
-Method Detail
- -

-clear

-
-public static void clear()
-
-
Clears the counter on the quadrature decoder chip -

-

-
-
-
-
- -

-finalize

-
-public void finalize()
-
-
Finalizes Encoder -

-

-
Overrides:
finalize in class java.lang.Object
-
-
-
-
-
-
- -

-getCount

-
-public static int getCount()
-
-
Gets the count on the quadrature decoder chip -

-

- -
Returns:
the number of pulses (in 2-complement) since the last time - the counter was cleared
-
-
-
- -

-getCountAndClear

-
-public static int getCountAndClear()
-
-
Gets the count and clears the counter on the quadrature decoder chip -

-

- -
Returns:
the number of pulses (in 2-complement) since the last time - the counter was cleared
-
-
-
- -

-read

-
-public double read()
-
-
Reads the counter on the quadrature decoder chip and converts the motion - to radians -

-

- -
Returns:
the displacement in radians since the last time - the encoder was cleared
-
-
-
- -

-readAndClear

-
-public double readAndClear()
-
-
Reads the counter on the quadrature decoder chip, converts the motion - to radians and clears the counter -

-

- -
Returns:
the displacement in radians since the last time - the encoder was cleared
-
-
- -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/Host.html b/doc/javadocs/br/ufrgs/eletro/AIC/Host.html deleted file mode 100644 index cb5ff5c..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/Host.html +++ /dev/null @@ -1,604 +0,0 @@ - - - - - - -Host - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class Host

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.Host
-
-
-
Direct Known Subclasses:
HostCAN, HostUDP
-
-
-
-
public abstract class Host
extends java.lang.Object
- -

-Provides access host computer through a devived class -

- -

-

-
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
See Also:
HostCAN, -HostUDP
-
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Field Summary
-static intBRAKE_APPLIED - -
-          Brake applied status
-static intBRAKE_APPLY - -
-          Brake apply command
-static intBRAKE_RELEASE - -
-          Brake release command
-static intINVALID - -
-          Invalid command
-static intMOTOR_ACT - -
-          Motor actuate command
-static intMOTOR_IS_ON - -
-          Motor on status
-static intMOTOR_OFF - -
-          Motor off command
-static intMOTOR_ON - -
-          Motor on command
-static intRESET - -
-          AIC reset command
-protected  intstatus - -
-          Brake and motor status
-static intSTATUS - -
-          Status message identifier
-protected  doubleu - -
-          Voltage aplied to motors
-  - - - - - - - - - - -
-Constructor Summary
Host() - -
-           
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
-abstract  intcommand() - -
-          Gets command received from host computer
- intgetStatus() - -
-          Gets brake and motor status
-abstract  voidsendStatus(double disp, - int index) - -
-          Sends encoder displacement and sync-switch status to host
-abstract  voidsendStatus(int disp, - int index) - -
-          Sends encoder displacement and sync-switch status to host
- doublevoltage() - -
-          Gets motor voltage
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-INVALID

-
-public static final int INVALID
-
-
Invalid command -

-

-
See Also:
Constant Field Values
-
-
- -

-RESET

-
-public static final int RESET
-
-
AIC reset command -

-

-
See Also:
Constant Field Values
-
-
- -

-MOTOR_OFF

-
-public static final int MOTOR_OFF
-
-
Motor off command -

-

-
See Also:
Constant Field Values
-
-
- -

-BRAKE_APPLY

-
-public static final int BRAKE_APPLY
-
-
Brake apply command -

-

-
See Also:
Constant Field Values
-
-
- -

-MOTOR_ACT

-
-public static final int MOTOR_ACT
-
-
Motor actuate command -

-

-
See Also:
Constant Field Values
-
-
- -

-STATUS

-
-public static final int STATUS
-
-
Status message identifier -

-

-
See Also:
Constant Field Values
-
-
- -

-BRAKE_RELEASE

-
-public static final int BRAKE_RELEASE
-
-
Brake release command -

-

-
See Also:
Constant Field Values
-
-
- -

-MOTOR_ON

-
-public static final int MOTOR_ON
-
-
Motor on command -

-

-
See Also:
Constant Field Values
-
-
- -

-MOTOR_IS_ON

-
-public static final int MOTOR_IS_ON
-
-
Motor on status -

-

-
See Also:
Constant Field Values
-
-
- -

-BRAKE_APPLIED

-
-public static final int BRAKE_APPLIED
-
-
Brake applied status -

-

-
See Also:
Constant Field Values
-
-
- -

-u

-
-protected double u
-
-
Voltage aplied to motors -

-

-
-
-
- -

-status

-
-protected int status
-
-
Brake and motor status -

-

-
-
- - - - - - - - -
-Constructor Detail
- -

-Host

-
-public Host()
-
-
- - - - - - - - -
-Method Detail
- -

-command

-
-public abstract int command()
-                     throws java.lang.Exception
-
-
Gets command received from host computer -

-

- -
Returns:
command code -
Throws: -
java.lang.Exception - depending on implementation
-
-
-
- -

-sendStatus

-
-public abstract void sendStatus(double disp,
-                                int index)
-                         throws java.lang.Exception
-
-
Sends encoder displacement and sync-switch status to host -

-

-
Parameters:
disp - encoder displacement in rad
index - sync-switch status -
Throws: -
java.lang.Exception - depending on implementation
-
-
-
- -

-sendStatus

-
-public abstract void sendStatus(int disp,
-                                int index)
-                         throws java.lang.Exception
-
-
Sends encoder displacement and sync-switch status to host -

-

-
Parameters:
disp - encoder displacement in pulses
index - sync-switch status -
Throws: -
java.lang.Exception - depending on implementation
-
-
-
- -

-getStatus

-
-public int getStatus()
-
-
Gets brake and motor status -

-

- -
Returns:
brake and motor status
-
-
-
- -

-voltage

-
-public double voltage()
-
-
Gets motor voltage -

-

- -
Returns:
motor voltage
-
-
- -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/HostCAN.html b/doc/javadocs/br/ufrgs/eletro/AIC/HostCAN.html deleted file mode 100644 index e437004..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/HostCAN.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - -HostCAN - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class HostCAN

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.Host
-        |
-        +--br.ufrgs.eletro.AIC.HostCAN
-
-
-
-
public class HostCAN
extends Host
- -

-Provides access host computer through CAN bus -

- -

-

-
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
See Also:
HostUDP
-
- -

- - - - - - - - - - -
-Field Summary
- - - - - - - -
Fields inherited from class br.ufrgs.eletro.AIC.Host
BRAKE_APPLIED, BRAKE_APPLY, BRAKE_RELEASE, INVALID, MOTOR_ACT, MOTOR_IS_ON, MOTOR_OFF, MOTOR_ON, RESET, status, STATUS, u
-  - - - - - - - - - - - - - -
-Constructor Summary
HostCAN(int aicid) - -
-          Initializes HostCAN using CAN bus 0 as default
HostCAN(int aicid, - int bus) - -
-          Initializes HostCAN
-  - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- intcommand() - -
-          Gets command received from host computer
- voidfinalize() - -
-          Finalizes HostCAN
- voidsendStatus(double disp, - int index) - -
-          Sends encoder displacement and sync-switch status to host
- voidsendStatus(int disp, - int index) - -
-          Sends encoder displacement and sync-switch status to host
- - - - - - - -
Methods inherited from class br.ufrgs.eletro.AIC.Host
getStatus, voltage
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - - - - -
-Constructor Detail
- -

-HostCAN

-
-public HostCAN(int aicid,
-               int bus)
-        throws com.dalsemi.comm.CanBusException
-
-
Initializes HostCAN -

-

Parameters:
aicid - AIC identification on bus from 1 to 31
bus - CAN bus to use 0 or 1 -
Throws: -
com.dalsemi.comm.CanBusException - on CAN bus errors
-
- -

-HostCAN

-
-public HostCAN(int aicid)
-        throws com.dalsemi.comm.CanBusException
-
-
Initializes HostCAN using CAN bus 0 as default -

-

Parameters:
aicid - AIC identification on bus from 1 to 31 -
Throws: -
com.dalsemi.comm.CanBusException - on CAN bus errors
- - - - - - - - -
-Method Detail
- -

-finalize

-
-public void finalize()
-              throws com.dalsemi.comm.CanBusException
-
-
Finalizes HostCAN -

-

-
Overrides:
finalize in class java.lang.Object
-
-
- -
Throws: -
com.dalsemi.comm.CanBusException - on CAN bus errors
-
-
-
- -

-command

-
-public int command()
-            throws com.dalsemi.comm.CanBusException
-
-
Gets command received from host computer -

-

-
Specified by:
command in class Host
-
-
- -
Returns:
command code -
Throws: -
com.dalsemi.comm.CanBusException - on CAN bus errors
-
-
-
- -

-sendStatus

-
-public void sendStatus(double disp,
-                       int index)
-                throws com.dalsemi.comm.CanBusException
-
-
Sends encoder displacement and sync-switch status to host -

-

-
Specified by:
sendStatus in class Host
-
-
-
Parameters:
disp - encoder displacement in rad
index - sync-switch status -
Throws: -
com.dalsemi.comm.CanBusException - on CAN bus errors
-
-
-
- -

-sendStatus

-
-public void sendStatus(int disp,
-                       int index)
-                throws com.dalsemi.comm.CanBusException
-
-
Sends encoder displacement and sync-switch status to host -

-

-
Specified by:
sendStatus in class Host
-
-
-
Parameters:
disp - encoder displacement in pulses
index - sync-switch status -
Throws: -
com.dalsemi.comm.CanBusException - on CAN bus errors
-
-
- -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/HostUDP.html b/doc/javadocs/br/ufrgs/eletro/AIC/HostUDP.html deleted file mode 100644 index e0592a7..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/HostUDP.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - -HostUDP - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class HostUDP

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.Host
-        |
-        +--br.ufrgs.eletro.AIC.HostUDP
-
-
-
-
public class HostUDP
extends Host
- -

-Provides access host computer through UDP connetion -

- -

-

-
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
See Also:
HostCAN
-
- -

- - - - - - - - - - -
-Field Summary
- - - - - - - -
Fields inherited from class br.ufrgs.eletro.AIC.Host
BRAKE_APPLIED, BRAKE_APPLY, BRAKE_RELEASE, INVALID, MOTOR_ACT, MOTOR_IS_ON, MOTOR_OFF, MOTOR_ON, RESET, status, STATUS, u
-  - - - - - - - - - - - - - - - - -
-Constructor Summary
HostUDP(java.lang.String controllername) - -
-          Initializes HostUDP using default status and command port numbers
HostUDP(java.lang.String controllername, - int statport) - -
-          Initializes HostUDP using default command port numbers
HostUDP(java.lang.String controllername, - int statport, - int cmdport) - -
-          Initializes HostUDP
-  - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- intcommand() - -
-          Gets command received from host computer
- voidfinalize() - -
-          Finalizes HostUDP
- voidsendStatus(double disp, - int index) - -
-          Sends encoder displacement and sync-switch status to host
- voidsendStatus(int disp, - int index) - -
-          Sends encoder displacement and sync-switch status to host
- - - - - - - -
Methods inherited from class br.ufrgs.eletro.AIC.Host
getStatus, voltage
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - - - - -
-Constructor Detail
- -

-HostUDP

-
-public HostUDP(java.lang.String controllername,
-               int statport,
-               int cmdport)
-        throws java.net.UnknownHostException,
-               java.net.SocketException
-
-
Initializes HostUDP -

-

Parameters:
controllername - name of host computer
statport - UDP port on host to send status to
cmdport - UDP port on AIC to receive commands from host -
Throws: -
java.net.UnknownHostException - if host is unknown -
java.net.SocketException - on socket errors
-
- -

-HostUDP

-
-public HostUDP(java.lang.String controllername,
-               int statport)
-        throws java.net.UnknownHostException,
-               java.net.SocketException
-
-
Initializes HostUDP using default command port numbers -

-

Parameters:
controllername - name of host computer
statport - UDP port on host to send status to -
Throws: -
java.net.UnknownHostException - if host is unknown -
java.net.SocketException - on socket errors
-
- -

-HostUDP

-
-public HostUDP(java.lang.String controllername)
-        throws java.net.UnknownHostException,
-               java.net.SocketException
-
-
Initializes HostUDP using default status and command port numbers -

-

Parameters:
controllername - name of host computer -
Throws: -
java.net.UnknownHostException - if host is unknown -
java.net.SocketException - on socket errors
- - - - - - - - -
-Method Detail
- -

-finalize

-
-public void finalize()
-
-
Finalizes HostUDP -

-

-
Overrides:
finalize in class java.lang.Object
-
-
-
-
-
-
- -

-command

-
-public int command()
-            throws java.io.IOException
-
-
Gets command received from host computer -

-

-
Specified by:
command in class Host
-
-
- -
Returns:
command code -
Throws: -
java.io.IOException - on communication errors
-
-
-
- -

-sendStatus

-
-public void sendStatus(double disp,
-                       int index)
-                throws java.io.IOException
-
-
Sends encoder displacement and sync-switch status to host -

-

-
Specified by:
sendStatus in class Host
-
-
-
Parameters:
disp - encoder displacement in rad
index - sync-switch status -
Throws: -
java.io.IOException - on communication errors
-
-
-
- -

-sendStatus

-
-public void sendStatus(int disp,
-                       int index)
-                throws java.io.IOException
-
-
Sends encoder displacement and sync-switch status to host -

-

-
Specified by:
sendStatus in class Host
-
-
-
Parameters:
disp - encoder displacement in pulses
index - sync-switch status -
Throws: -
java.io.IOException - on communication errors
-
-
- -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/Index.html b/doc/javadocs/br/ufrgs/eletro/AIC/Index.html deleted file mode 100644 index 6871109..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/Index.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - -Index - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class Index

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.Index
-
-
-
-
public final class Index
extends java.lang.Object
- -

-Provides access to sync-switch in an Actuator Interface Card -

- -

-

-
Version:
AIC-1.3.0
- -
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
-
- -

- - - - - - - - - - - - - - - - -
-Constructor Summary
Index(int base) - -
-          Initializes Index
-  - - - - - - - - - - - -
-Method Summary
-static booleanread() - -
-          Reads the sync-switch
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - - - - -
-Constructor Detail
- -

-Index

-
-public Index(int base)
-
-
Initializes Index -

-

Parameters:
base - Base address for on board devices
- - - - - - - - -
-Method Detail
- -

-read

-
-public static boolean read()
-
-
Reads the sync-switch -

-

- -
Returns:
the sync-switch state
-
-
- -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/Motor.html b/doc/javadocs/br/ufrgs/eletro/AIC/Motor.html deleted file mode 100644 index be8b26d..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/Motor.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - -Motor - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class Motor

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.Motor
-
-
-
-
public class Motor
extends java.lang.Object
- -

-Provices access to the motor driver in an Actuator Interface Card -

- -

-

-
Version:
AIC-1.3.0
- -
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
-
- -

- - - - - - - - - - - - - - - - - - - -
-Constructor Summary
Motor(int baseadd, - double voltage) - -
-          Initializes the motor driver using the default PWM frequency (20KHz)
Motor(int baseadd, - double voltage, - double freq) - -
-          Initializes the motor driver
-  - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidfinalize() - -
-          Finalizes the motor driver
- voidoff() - -
-          Turns the motor driver off
- voidon() - -
-          Turns the motor driver on
- doubleset(double voltage) - -
-          Sets the voltage to be applied by the motor driver
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - - - - -
-Constructor Detail
- -

-Motor

-
-public Motor(int baseadd,
-             double voltage,
-             double freq)
-
-
Initializes the motor driver -

-

Parameters:
baseadd - Base address for on board devices
voltage - Motor Voltage
freq - PWM frequency
-
- -

-Motor

-
-public Motor(int baseadd,
-             double voltage)
-
-
Initializes the motor driver using the default PWM frequency (20KHz) -

-

Parameters:
baseadd - Base address for on board devices
voltage - Motor Voltage
- - - - - - - - -
-Method Detail
- -

-finalize

-
-public void finalize()
-
-
Finalizes the motor driver -

-

-
Overrides:
finalize in class java.lang.Object
-
-
-
-
-
-
- -

-on

-
-public void on()
-
-
Turns the motor driver on -

-

-
-
-
-
- -

-off

-
-public void off()
-
-
Turns the motor driver off -

-

-
-
-
-
- -

-set

-
-public double set(double voltage)
-
-
Sets the voltage to be applied by the motor driver -

-

-
Parameters:
voltage - to be applied by the motor driver -
Returns:
the duty-cycle of the associated PWM
-
-
- -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/PLD.html b/doc/javadocs/br/ufrgs/eletro/AIC/PLD.html deleted file mode 100644 index 7ac164b..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/PLD.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - -PLD - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class PLD

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.PLD
-
-
- -

-

-
public class PLD
extends java.lang.Object
- -

-Provides constants defining addresses for devices in an Actuator Interface Card -

- -

-

-
Since:
AIC-1.2.0
- -
Version:
AIC-1.3.0
- -
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
-
- -

- - - - - - - - - - - - - - - - - - - - - - -
-Field Summary
-static intCONTROL - -
-          Deprecated. Control register address
-static intENCODER - -
-          Deprecated. Encoder address
-static intPWM - -
-          Deprecated. PWM address
-  - - - - - - - - - - -
-Constructor Summary
PLD() - -
-          Deprecated.  
-  - - - - - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-PWM

-
-public static final int PWM
-
-
Deprecated. 
PWM address -

-

-
See Also:
PWM, -Constant Field Values
-
-
- -

-ENCODER

-
-public static final int ENCODER
-
-
Deprecated. 
Encoder address -

-

-
See Also:
Encoder, -Constant Field Values
-
-
- -

-CONTROL

-
-public static final int CONTROL
-
-
Deprecated. 
Control register address -

-

-
See Also:
CtrlRegister, -Constant Field Values
-
- - - - - - - - -
-Constructor Detail
- -

-PLD

-
-public PLD()
-
-
Deprecated. 
- - - - -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/PWM.html b/doc/javadocs/br/ufrgs/eletro/AIC/PWM.html deleted file mode 100644 index 8c7a7c6..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/PWM.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - -PWM - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -

- -br.ufrgs.eletro.AIC -
-Class PWM

-
-java.lang.Object
-  |
-  +--br.ufrgs.eletro.AIC.PWM
-
-
-
-
public final class PWM
extends java.lang.Object
- -

-Provices access to the PWM in an Actuator Interface Card -

- -

-

-
Version:
AIC-1.3.0
- -
Author:
Walter Fetter Lages (w.fetter@ieee.org)
- -
-
- -

- - - - - - - - - - - - - - - - - - -
-Field Summary
-static doubleREF_FREQ - -
-          Reference frequency = 10MHz
-static doubleSW_FREQ - -
-          Default Switching Frequency = 20KHz
-  - - - - - - - - - - - - - -
-Constructor Summary
PWM(int base) - -
-          Initializes the PWM using the default PWM frequency (20KHz)
PWM(int base, - double freq) - -
-          Initializes the PWM
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidfinalize() - -
-          Finalizes the PWM
- doublegetFreq() - -
-          Returns the frequency of PWM
-static voidoff() - -
-          Turns the PWM off
-static voidon() - -
-          Turns the PWM on
-static voidsetCount(int count) - -
-          Sets the frequency of PWM in cycles of 10MHz
- intsetDuty(double dutycycle) - -
-          Sets the duty-cycle of PWM
-static intsetDuty(int dutycycle) - -
-          Sets the duty-cycle of PWM
- voidsetFreq(double frequency) - -
-          Sets the frequency of PWM
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-REF_FREQ

-
-public static final double REF_FREQ
-
-
Reference frequency = 10MHz -

-

-
See Also:
Constant Field Values
-
-
- -

-SW_FREQ

-
-public static final double SW_FREQ
-
-
Default Switching Frequency = 20KHz -

-

-
See Also:
Constant Field Values
-
- - - - - - - - -
-Constructor Detail
- -

-PWM

-
-public PWM(int base,
-           double freq)
-
-
Initializes the PWM -

-

Parameters:
freq - PWM frequency
-
- -

-PWM

-
-public PWM(int base)
-
-
Initializes the PWM using the default PWM frequency (20KHz) -

-

- - - - - - - - -
-Method Detail
- -

-setCount

-
-public static void setCount(int count)
-
-
Sets the frequency of PWM in cycles of 10MHz -

-

-
Parameters:
count - number of cycles from 10 to 65530. Default - value is 500
Since:
AIC-1.3.0
-
-
- - -
- -

-setFreq

-
-public void setFreq(double frequency)
-
-
Sets the frequency of PWM -

-

-
Parameters:
frequency - frequency in Hz from 152.60Hz to 1MHz. Default - value is 20KHz
-
-
-
- -

-getFreq

-
-public double getFreq()
-
-
Returns the frequency of PWM -

-

- -
Returns:
PWM frequency in Hz
-
-
-
- -

-finalize

-
-public void finalize()
-
-
Finalizes the PWM -

-

-
Overrides:
finalize in class java.lang.Object
-
-
-
-
-
-
- -

-setDuty

-
-public int setDuty(double dutycycle)
-
-
Sets the duty-cycle of PWM -

-

-
Parameters:
dutycycle - to be used by PWM as a double from 0 to 1.0 -
Returns:
the count value programmed to the PWM timer
-
-
-
- -

-setDuty

-
-public static int setDuty(int dutycycle)
-
-
Sets the duty-cycle of PWM -

-

-
Parameters:
dutycycle - to be used by PWM as a int from 0 to 1000000 -
Returns:
the count value programmed to the PWM timer
-
-
-
- -

-on

-
-public static void on()
-
-
Turns the PWM on -

-

-
-
-
-
- -

-off

-
-public static void off()
-
-
Turns the PWM off -

-

-
-
-
- -
- - - - - - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/package-frame.html b/doc/javadocs/br/ufrgs/eletro/AIC/package-frame.html deleted file mode 100644 index 39e3e1a..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/package-frame.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - -br.ufrgs.eletro.AIC() - - - - - - -br.ufrgs.eletro.AIC - - - - -
-Classes  - -
-AIC -
-Brake -
-CtrlRegister -
-Encoder -
-Host -
-HostCAN -
-HostUDP -
-Index -
-Motor -
-PLD -
-PWM
- - - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/package-summary.html b/doc/javadocs/br/ufrgs/eletro/AIC/package-summary.html deleted file mode 100644 index d5a2d91..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/package-summary.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - -br.ufrgs.eletro.AIC() - - - - - - - - - - - - - - - - - - -
- -
- - -
-

-Package br.ufrgs.eletro.AIC -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Class Summary
AICProvides access to all devices in an Actuator Interface Card
BrakeProvides access to electromagnetic brake in an Actuator Interface Card
CtrlRegisterDeprecated.  
EncoderProvides access to incremental encoder in an Actuator Interface Card
HostProvides access host computer through a devived class
HostCANProvides access host computer through CAN bus
HostUDPProvides access host computer through UDP connetion
IndexProvides access to sync-switch in an Actuator Interface Card
MotorProvices access to the motor driver in an Actuator Interface Card
PLDDeprecated.  
PWMProvices access to the PWM in an Actuator Interface Card
-  - -

-


- - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/br/ufrgs/eletro/AIC/package-tree.html b/doc/javadocs/br/ufrgs/eletro/AIC/package-tree.html deleted file mode 100644 index a42269d..0000000 --- a/doc/javadocs/br/ufrgs/eletro/AIC/package-tree.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - -br.ufrgs.eletro.AIC Class Hierarchy - - - - - - - - - - - - - - - - - - -
- -
- - -
-
-

-Hierarchy For Package br.ufrgs.eletro.AIC -

-
-

-Class Hierarchy -

-
    -
  • class java.lang.Object
      -
    • class br.ufrgs.eletro.AIC.AIC
    • class br.ufrgs.eletro.AIC.Brake
    • class br.ufrgs.eletro.AIC.CtrlRegister
    • class br.ufrgs.eletro.AIC.Encoder
    • class br.ufrgs.eletro.AIC.Host -
    • class br.ufrgs.eletro.AIC.Index
    • class br.ufrgs.eletro.AIC.Motor
    • class br.ufrgs.eletro.AIC.PLD
    • class br.ufrgs.eletro.AIC.PWM
    -
-
- - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/constant-values.html b/doc/javadocs/constant-values.html deleted file mode 100644 index 26da8db..0000000 --- a/doc/javadocs/constant-values.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - -Constant Field Values - - - - - - - - - - - - - - - - - - -
- -
- - -
-
-

-Constant Field Values

-
-
-Contents - - - - - - -
-br.ufrgs.*
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
br.ufrgs.eletro.AIC.CtrlRegister
-public static final intBRAKEAPPLY2
-public static final intBRAKERELEASE3
-public static final intPWMDISABLE0
-public static final intPWMENABLE1
- -

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
br.ufrgs.eletro.AIC.Host
-public static final intBRAKE_APPLIED2
-public static final intBRAKE_APPLY3
-public static final intBRAKE_RELEASE48
-public static final intINVALID0
-public static final intMOTOR_ACT16
-public static final intMOTOR_IS_ON1
-public static final intMOTOR_OFF2
-public static final intMOTOR_ON49
-public static final intRESET1
-public static final intSTATUS32
- -

- -

- - - - - - - - - - - - - - - - - - - - - - -
br.ufrgs.eletro.AIC.PLD
-public static final intCONTROL655360
-public static final intENCODER589824
-public static final intPWM524288
- -

- -

- - - - - - - - - - - - - - - - - -
br.ufrgs.eletro.AIC.PWM
-public static final doubleREF_FREQ1.0E7d
-public static final doubleSW_FREQ20000.0d
- -

- -

-


- - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/deprecated-list.html b/doc/javadocs/deprecated-list.html deleted file mode 100644 index c9cc73b..0000000 --- a/doc/javadocs/deprecated-list.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Deprecated List () - - - - - - - - - - - - - - - - - - -
- -
- - -
-
-

-Deprecated API

-
- - - - - - - - - - - -
-Deprecated Classes
br.ufrgs.eletro.AIC.CtrlRegister -
-            
br.ufrgs.eletro.AIC.PLD -
-            
-  -

-


- - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/help-doc.html b/doc/javadocs/help-doc.html deleted file mode 100644 index b6510fb..0000000 --- a/doc/javadocs/help-doc.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - -API Help () - - - - - - - - - - - - - - - - - - -
- -
- - -
-
-

-How This API Document Is Organized

-
-This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

-Package

-
- -

-Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

    -
  • Interfaces (italic)
  • Classes
  • Exceptions
  • Errors
-
-

-Class/Interface

-
- -

-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    -
  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description -

    -

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary -

    -

  • Field Detail
  • Constructor Detail
  • Method Detail
-Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-

-Tree (Class Hierarchy)

-
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
    -
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
-
-

-Deprecated API

-
-The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-

-Index

-
-The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-

-Prev/Next

-These links take you to the next or previous class, interface, package, or related page.

-Frames/No Frames

-These links show and hide the HTML frames. All pages are available with or without frames. -

-

-Serialized Form

-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. -

- - -This help file applies to API documentation generated using the standard doclet. - -
-


- - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/index-all.html b/doc/javadocs/index-all.html deleted file mode 100644 index 37fa3a4..0000000 --- a/doc/javadocs/index-all.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - -Index () - - - - - - - - - - - - - - - - - - -
- -
- - -A B C E F G H I M O P R S U V
-

-A

-
-
AIC - class br.ufrgs.eletro.AIC.AIC.
Provides access to all devices in an Actuator Interface Card
AIC(int, double, double, int) - -Constructor for class br.ufrgs.eletro.AIC.AIC -
Initializes an AIC -
apply() - -Static method in class br.ufrgs.eletro.AIC.Brake -
Applies the electromagnetic brake -
-
-

-B

-
-
br.ufrgs.eletro.AIC - package br.ufrgs.eletro.AIC
 
brake - -Variable in class br.ufrgs.eletro.AIC.AIC -
Brake actuaded by AIC -
Brake - class br.ufrgs.eletro.AIC.Brake.
Provides access to electromagnetic brake in an Actuator Interface Card
BRAKE_APPLIED - -Static variable in class br.ufrgs.eletro.AIC.Host -
Brake applied status -
BRAKE_APPLY - -Static variable in class br.ufrgs.eletro.AIC.Host -
Brake apply command -
BRAKE_RELEASE - -Static variable in class br.ufrgs.eletro.AIC.Host -
Brake release command -
Brake(int) - -Constructor for class br.ufrgs.eletro.AIC.Brake -
Initializes Brake. -
BRAKEAPPLY - -Static variable in class br.ufrgs.eletro.AIC.CtrlRegister -
Deprecated. Apply Brake -
BRAKERELEASE - -Static variable in class br.ufrgs.eletro.AIC.CtrlRegister -
Deprecated. Release Brake -
-
-

-C

-
-
clear() - -Static method in class br.ufrgs.eletro.AIC.Encoder -
Clears the counter on the quadrature decoder chip -
command() - -Method in class br.ufrgs.eletro.AIC.Host -
Gets command received from host computer -
command() - -Method in class br.ufrgs.eletro.AIC.HostUDP -
Gets command received from host computer -
command() - -Method in class br.ufrgs.eletro.AIC.HostCAN -
Gets command received from host computer -
CONTROL - -Static variable in class br.ufrgs.eletro.AIC.PLD -
Deprecated. Control register address -
CtrlRegister - class br.ufrgs.eletro.AIC.CtrlRegister.
Deprecated.  
CtrlRegister() - -Constructor for class br.ufrgs.eletro.AIC.CtrlRegister -
Deprecated.   -
-
-

-E

-
-
encoder - -Variable in class br.ufrgs.eletro.AIC.AIC -
Encoder read by AIC -
Encoder - class br.ufrgs.eletro.AIC.Encoder.
Provides access to incremental encoder in an Actuator Interface Card
ENCODER - -Static variable in class br.ufrgs.eletro.AIC.PLD -
Deprecated. Encoder address -
Encoder(int, int) - -Constructor for class br.ufrgs.eletro.AIC.Encoder -
Initializes Encoder, clears the counter on the quadrature decoder chip -
-
-

-F

-
-
finalize() - -Method in class br.ufrgs.eletro.AIC.PWM -
Finalizes the PWM -
finalize() - -Method in class br.ufrgs.eletro.AIC.Motor -
Finalizes the motor driver -
finalize() - -Method in class br.ufrgs.eletro.AIC.Encoder -
Finalizes Encoder -
finalize() - -Method in class br.ufrgs.eletro.AIC.AIC -
Finalizes an AIC -
finalize() - -Method in class br.ufrgs.eletro.AIC.HostUDP -
Finalizes HostUDP -
finalize() - -Method in class br.ufrgs.eletro.AIC.HostCAN -
Finalizes HostCAN -
-
-

-G

-
-
getCount() - -Static method in class br.ufrgs.eletro.AIC.Encoder -
Gets the count on the quadrature decoder chip -
getCountAndClear() - -Static method in class br.ufrgs.eletro.AIC.Encoder -
Gets the count and clears the counter on the quadrature decoder chip -
getFreq() - -Method in class br.ufrgs.eletro.AIC.PWM -
Returns the frequency of PWM -
getStatus() - -Method in class br.ufrgs.eletro.AIC.Host -
Gets brake and motor status -
-
-

-H

-
-
Host - class br.ufrgs.eletro.AIC.Host.
Provides access host computer through a devived class
Host() - -Constructor for class br.ufrgs.eletro.AIC.Host -
  -
HostCAN - class br.ufrgs.eletro.AIC.HostCAN.
Provides access host computer through CAN bus
HostCAN(int) - -Constructor for class br.ufrgs.eletro.AIC.HostCAN -
Initializes HostCAN using CAN bus 0 as default -
HostCAN(int, int) - -Constructor for class br.ufrgs.eletro.AIC.HostCAN -
Initializes HostCAN -
HostUDP - class br.ufrgs.eletro.AIC.HostUDP.
Provides access host computer through UDP connetion
HostUDP(String) - -Constructor for class br.ufrgs.eletro.AIC.HostUDP -
Initializes HostUDP using default status and command port numbers -
HostUDP(String, int) - -Constructor for class br.ufrgs.eletro.AIC.HostUDP -
Initializes HostUDP using default command port numbers -
HostUDP(String, int, int) - -Constructor for class br.ufrgs.eletro.AIC.HostUDP -
Initializes HostUDP -
-
-

-I

-
-
index - -Variable in class br.ufrgs.eletro.AIC.AIC -
Sync-switch read by AIC -
Index - class br.ufrgs.eletro.AIC.Index.
Provides access to sync-switch in an Actuator Interface Card
Index(int) - -Constructor for class br.ufrgs.eletro.AIC.Index -
Initializes Index -
INVALID - -Static variable in class br.ufrgs.eletro.AIC.Host -
Invalid command -
-
-

-M

-
-
motor - -Variable in class br.ufrgs.eletro.AIC.AIC -
Motor actuated by AIC -
Motor - class br.ufrgs.eletro.AIC.Motor.
Provices access to the motor driver in an Actuator Interface Card
MOTOR_ACT - -Static variable in class br.ufrgs.eletro.AIC.Host -
Motor actuate command -
MOTOR_IS_ON - -Static variable in class br.ufrgs.eletro.AIC.Host -
Motor on status -
MOTOR_OFF - -Static variable in class br.ufrgs.eletro.AIC.Host -
Motor off command -
MOTOR_ON - -Static variable in class br.ufrgs.eletro.AIC.Host -
Motor on command -
Motor(int, double) - -Constructor for class br.ufrgs.eletro.AIC.Motor -
Initializes the motor driver using the default PWM frequency (20KHz) -
Motor(int, double, double) - -Constructor for class br.ufrgs.eletro.AIC.Motor -
Initializes the motor driver -
-
-

-O

-
-
off() - -Static method in class br.ufrgs.eletro.AIC.PWM -
Turns the PWM off -
off() - -Method in class br.ufrgs.eletro.AIC.Motor -
Turns the motor driver off -
off() - -Method in class br.ufrgs.eletro.AIC.AIC -
Turns an AIC off -
on() - -Static method in class br.ufrgs.eletro.AIC.PWM -
Turns the PWM on -
on() - -Method in class br.ufrgs.eletro.AIC.Motor -
Turns the motor driver on -
on() - -Method in class br.ufrgs.eletro.AIC.AIC -
Turns an AIC on -
-
-

-P

-
-
PLD - class br.ufrgs.eletro.AIC.PLD.
Deprecated.  
PLD() - -Constructor for class br.ufrgs.eletro.AIC.PLD -
Deprecated.   -
PULSES - -Variable in class br.ufrgs.eletro.AIC.Encoder -
Number of pulses per revolution of the encoder, considering the - quadrature decoder -
PWM - class br.ufrgs.eletro.AIC.PWM.
Provices access to the PWM in an Actuator Interface Card
PWM - -Static variable in class br.ufrgs.eletro.AIC.PLD -
Deprecated. PWM address -
PWM(int) - -Constructor for class br.ufrgs.eletro.AIC.PWM -
Initializes the PWM using the default PWM frequency (20KHz) -
PWM(int, double) - -Constructor for class br.ufrgs.eletro.AIC.PWM -
Initializes the PWM -
PWMDISABLE - -Static variable in class br.ufrgs.eletro.AIC.CtrlRegister -
Deprecated. PWM disable -
PWMENABLE - -Static variable in class br.ufrgs.eletro.AIC.CtrlRegister -
Deprecated. PWM enable -
-
-

-R

-
-
read() - -Method in class br.ufrgs.eletro.AIC.Encoder -
Reads the counter on the quadrature decoder chip and converts the motion - to radians -
read() - -Static method in class br.ufrgs.eletro.AIC.Index -
Reads the sync-switch -
readAndClear() - -Method in class br.ufrgs.eletro.AIC.Encoder -
Reads the counter on the quadrature decoder chip, converts the motion - to radians and clears the counter -
REF_FREQ - -Static variable in class br.ufrgs.eletro.AIC.PWM -
Reference frequency = 10MHz -
release() - -Static method in class br.ufrgs.eletro.AIC.Brake -
Releases the electromagnetic brake -
RESET - -Static variable in class br.ufrgs.eletro.AIC.Host -
AIC reset command -
-
-

-S

-
-
sendStatus(double, int) - -Method in class br.ufrgs.eletro.AIC.Host -
Sends encoder displacement and sync-switch status to host -
sendStatus(double, int) - -Method in class br.ufrgs.eletro.AIC.HostUDP -
Sends encoder displacement and sync-switch status to host -
sendStatus(double, int) - -Method in class br.ufrgs.eletro.AIC.HostCAN -
Sends encoder displacement and sync-switch status to host -
sendStatus(int, int) - -Method in class br.ufrgs.eletro.AIC.Host -
Sends encoder displacement and sync-switch status to host -
sendStatus(int, int) - -Method in class br.ufrgs.eletro.AIC.HostUDP -
Sends encoder displacement and sync-switch status to host -
sendStatus(int, int) - -Method in class br.ufrgs.eletro.AIC.HostCAN -
Sends encoder displacement and sync-switch status to host -
set(double) - -Method in class br.ufrgs.eletro.AIC.Motor -
Sets the voltage to be applied by the motor driver -
setCount(int) - -Static method in class br.ufrgs.eletro.AIC.PWM -
Sets the frequency of PWM in cycles of 10MHz -
setDuty(double) - -Method in class br.ufrgs.eletro.AIC.PWM -
Sets the duty-cycle of PWM -
setDuty(int) - -Static method in class br.ufrgs.eletro.AIC.PWM -
Sets the duty-cycle of PWM -
setFreq(double) - -Method in class br.ufrgs.eletro.AIC.PWM -
Sets the frequency of PWM -
status - -Variable in class br.ufrgs.eletro.AIC.Host -
Brake and motor status -
STATUS - -Static variable in class br.ufrgs.eletro.AIC.Host -
Status message identifier -
SW_FREQ - -Static variable in class br.ufrgs.eletro.AIC.PWM -
Default Switching Frequency = 20KHz -
-
-

-U

-
-
u - -Variable in class br.ufrgs.eletro.AIC.Host -
Voltage aplied to motors -
-
-

-V

-
-
voltage() - -Method in class br.ufrgs.eletro.AIC.Host -
Gets motor voltage -
-
-A B C E F G H I M O P R S U V - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/index.html b/doc/javadocs/index.html deleted file mode 100644 index 52b13f4..0000000 --- a/doc/javadocs/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - -Generated Documentation (Untitled) - - - - - - - -<H2> -Frame Alert</H2> - -<P> -This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. -<BR> -Link to<A HREF="br/ufrgs/eletro/AIC/package-summary.html">Non-frame version.</A> - diff --git a/doc/javadocs/overview-tree.html b/doc/javadocs/overview-tree.html deleted file mode 100644 index a594f29..0000000 --- a/doc/javadocs/overview-tree.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - -Class Hierarchy () - - - - - - - - - - - - - - - - - - -
- -
- - -
-
-

-Hierarchy For All Packages

-
-
-
Package Hierarchies:
br.ufrgs.eletro.AIC
-
-

-Class Hierarchy -

-
    -
  • class java.lang.Object
      -
    • class br.ufrgs.eletro.AIC.AIC
    • class br.ufrgs.eletro.AIC.Brake
    • class br.ufrgs.eletro.AIC.CtrlRegister
    • class br.ufrgs.eletro.AIC.Encoder
    • class br.ufrgs.eletro.AIC.Host -
    • class br.ufrgs.eletro.AIC.Index
    • class br.ufrgs.eletro.AIC.Motor
    • class br.ufrgs.eletro.AIC.PLD
    • class br.ufrgs.eletro.AIC.PWM
    -
-
- - - - - - - - - - - - - -
- -
- - -
- - - diff --git a/doc/javadocs/package-list b/doc/javadocs/package-list deleted file mode 100644 index cbe5275..0000000 --- a/doc/javadocs/package-list +++ /dev/null @@ -1 +0,0 @@ -br.ufrgs.eletro.AIC diff --git a/doc/javadocs/packages.html b/doc/javadocs/packages.html deleted file mode 100644 index 25837c1..0000000 --- a/doc/javadocs/packages.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - -
- -
- -
-
-The front page has been relocated.Please see: -
-          Frame version -
-          Non-frame version.
- - - diff --git a/doc/javadocs/stylesheet.css b/doc/javadocs/stylesheet.css deleted file mode 100644 index b62ecb5..0000000 --- a/doc/javadocs/stylesheet.css +++ /dev/null @@ -1,29 +0,0 @@ -/* Javadoc style sheet */ - -/* Define colors, fonts and other style attributes here to override the defaults */ - -/* Page background color */ -body { background-color: #FFFFFF } - -/* Table colors */ -.TableHeadingColor { background: #CCCCFF } /* Dark mauve */ -.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ -.TableRowColor { background: #FFFFFF } /* White */ - -/* Font used in left-hand frame lists */ -.FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } -.FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } -.FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } - -/* Example of smaller, sans-serif font in frames */ -/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ - -/* Navigation bar fonts and colors */ -.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */ -.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */ -.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} -.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} - -.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} -.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} - diff --git a/lib/aiccan.cpp b/lib/aiccan.cpp index b7b2e21..c1cacfc 100644 --- a/lib/aiccan.cpp +++ b/lib/aiccan.cpp @@ -47,8 +47,7 @@ AIC(this) { aicnumber=aic; canHandle handle; - handle=canOpenChannel(bus,canWANT_EXTENDED); - canStatus status=(canStatus)handle; + canStatus status=(canStatus)handle=canOpenChannel(bus,canWANT_EXTENDED); if(status < 0) throw BAD_OPEN(); status=canSetBusParams(handle,BAUD_125K,13,7,1,1,0); diff --git a/lib/aichostcan.cpp b/lib/aichostcan.cpp index f356d4a..3d5a292 100644 --- a/lib/aichostcan.cpp +++ b/lib/aichostcan.cpp @@ -41,8 +41,7 @@ AIC_HOST() { aicnumber=aic; canHandle handle; - handle=canOpenChannel(bus,canWANT_EXTENDED); - canStatus status=(canStatus)handle; + canStatus status=(canStatus)handle=canOpenChannel(bus,canWANT_EXTENDED); if(status < 0) throw BAD_OPEN(); status=canSetBusParams(handle,BAUD_125K,13,7,1,1,0); diff --git a/pid/pid.cpp b/pid/pid.cpp index 9a5860e..5c41b11 100644 --- a/pid/pid.cpp +++ b/pid/pid.cpp @@ -93,6 +93,7 @@ int main(int argc,char *argv[]) double u=0.0; double y=0.0; + int run=1; unsigned long maintsk_name = nam2num("PID"); @@ -128,25 +129,22 @@ int main(int argc,char *argv[]) for(double t=0; t <= TF && run; t=(rt_get_time_ns()-t0)*1e-9) { - rt_make_soft_real_time(); + #ifdef VERBOSE - cout << t << "\n"; + cout << t << "\t"; #endif - rt_make_hard_real_time(); - y+=aic->encoder.read(); - + +// y+=aic->encoder.read(); + double e=ref(t)-y; u=pid.out(e); - - aic->motor=15; -// if(((int)t) % 2) aic->motor=12.0; else aic->motor=-12.0; // test - - rt_make_soft_real_time(); + +// aic->motor=u; + if(((int)t) % 2) aic->motor=12.0; else aic->motor=-12.0; // test + #ifdef VERBOSE - cout <motor=0; diff --git a/pid/runinfo b/pid/runinfo index 4d5f674..478ce5e 100644 --- a/pid/runinfo +++ b/pid/runinfo @@ -1 +1 @@ -pid:lxrt:./pid 2;popall: +pid:lxrt:./pid 1;popall: diff --git a/pid5/runinfo b/pid5/runinfo index 648edf9..478ce5e 100644 --- a/pid5/runinfo +++ b/pid5/runinfo @@ -1 +1 @@ -pid:lxrt:./pid;popall: +pid:lxrt:./pid 1;popall: