]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/lx-rocon.git/blobdiff - sw/app/rocon/appl_pxmccmds.c
RoCoN: add proper DQ current components controllers for stepper motor.
[fpga/lx-cpu1/lx-rocon.git] / sw / app / rocon / appl_pxmccmds.c
diff --git a/sw/app/rocon/appl_pxmccmds.c b/sw/app/rocon/appl_pxmccmds.c
new file mode 100644 (file)
index 0000000..1bcf667
--- /dev/null
@@ -0,0 +1,63 @@
+/*******************************************************************
+  Motion and Robotic System (MARS) aplication components.
+
+  appl_pxmccmds.c - position controller RoCoN specific commands
+
+  Copyright (C) 2001-2013 by Pavel Pisa - originator
+                          pisa@cmp.felk.cvut.cz
+            (C) 2001-2013 by PiKRON Ltd. - originator
+                    http://www.pikron.com
+
+  This file can be used and copied according to next
+  license alternatives
+   - GPL - GNU Public License
+   - other license provided by project originators
+
+ *******************************************************************/
+
+#include <system_def.h>
+#include <pxmc.h>
+#include <stdlib.h>
+#include <string.h>
+#include "pxmc_cmds.h"
+
+#include "appl_defs.h"
+#include "appl_fpga.h"
+#include "appl_pxmc.h"
+
+
+cmd_des_t const cmd_des_regcurdp={0, CDESM_OPCHR|CDESM_RW,
+                        "REGCURDP?","current controller d component p parameter", cmd_do_reg_short_val,
+                        {(char*)pxmc_rocon_state_offs(cur_d_p),
+                         0}};
+
+cmd_des_t const cmd_des_regcurdi={0, CDESM_OPCHR|CDESM_RW,
+                        "REGCURDI?","current controller d component i parameter", cmd_do_reg_short_val,
+                        {(char*)pxmc_rocon_state_offs(cur_d_i),
+                         0}};
+
+cmd_des_t const cmd_des_regcurqp={0, CDESM_OPCHR|CDESM_RW,
+                        "REGCURQP?","current controller q component p parameter", cmd_do_reg_short_val,
+                        {(char*)pxmc_rocon_state_offs(cur_q_p),
+                         0}};
+
+cmd_des_t const cmd_des_regcurqi={0, CDESM_OPCHR|CDESM_RW,
+                        "REGCURQI?","current controller q component i parameter", cmd_do_reg_short_val,
+                        {(char*)pxmc_rocon_state_offs(cur_q_i),
+                         0}};
+
+cmd_des_t const cmd_des_regcurhold={0, CDESM_OPCHR|CDESM_RW,
+                        "REGCURHOLD?","current steady hold value for stepper", cmd_do_reg_short_val,
+                        {(char*)pxmc_rocon_state_offs(cur_hold),
+                         0}};
+
+
+cmd_des_t const *cmd_appl_pxmc[] =
+{
+  &cmd_des_regcurdp,
+  &cmd_des_regcurdi,
+  &cmd_des_regcurqp,
+  &cmd_des_regcurqi,
+  &cmd_des_regcurhold,
+  NULL
+};