Skip to content
Snippets Groups Projects
Commit dd7802f7 authored by Pascal Engeler's avatar Pascal Engeler
Browse files

Added notebook to evaluate pid controller

parent 178dded0
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id:7e06b69d tags:
``` python
import pidcontroller
```
%% Cell type:code id:dc086560 tags:
``` python
controller = pidcontroller.PidController('COM5')
```
%% Output
PID Controller Connected Successfully
%% Cell type:code id:134b77e1 tags:
``` python
controller._sendCommand('P2.254;')
controller._sendCommand('I0.0014;')
controller._sendCommand('D100.348;')
controller._sendCommand('N370.75;')
controller._sendCommand('S31.0;')
```
%% Output
';'
%% Cell type:code id:f35f5556 tags:
``` python
controller._sendCommand('p')
```
%% Output
'2.254000,0.001400,100.348000;'
%% Cell type:code id:bcf2eedd tags:
``` python
controller._sendCommand('v')
```
%% Output
'-0.027327,381.741730,-0.000098;'
%% Cell type:code id:ec963ad6 tags:
``` python
controller._sendCommand('t')
```
%% Output
'31.027632,30.811564,30.906875,30.280394,30.118540;'
%% Cell type:code id:5965db64 tags:
``` python
controller._sendCommand('o')
```
%% Output
'0.464288;'
%% Cell type:code id:e1c88aaf tags:
``` python
controller.disconnect()
```
%% Output
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_34064/1597917223.py in <module>
----> 1 controller.connect()
TypeError: connect() missing 1 required positional argument: 'port'
%% Cell type:code id:7154d4dd tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment