collapse

Welcome!



Welcome to Robot Rebels, an online robot maker community.

Register today to post your projects, ask questions, share knowledge and meet like-minded people from around the world.


The RobotRebel.org Community

Author Topic: PLX-DAQ  (Read 257 times)

BaldwinK

  • Member
  • ****
  • B
  • Posts: 17
PLX-DAQ
« on: January 16, 2019, 06:44:18 AM »
Diagnostic help when coding is often achieved using the console print facility of the microprocessor. However, when there is a lot of data, the resulting torrent washing over the screen soon becomes meaningless.

A free download from Parallax Inc provides a link into Excel which shares the same USB port for the console. Either the IDE or PLX-DAQ can be connected, but not both together.

Why Use This?

My ongoing project to make a quadruped walk has nearly been abandoned more than once. Not being able to see exactly what is going on inside a complex distributed system makes progress very difficult.

So I took some time out to write routines to create better tools for the job in hand. This extra work has helped regain focus on the main issues. It shows what can be done, but it is surely well over the top for most needs.

sheet.jpg
*sheet.jpg (202.47 kB . 798x459 - viewed 29 times)

Each slave Nano holds information about the four motors under its control. The master runs a background task to enquire about one set at a time so as not to interfere with normal working. With a cycle time of 15mS this means all the display areas are updated every two seconds or so.

So facing the bot we see information for the Heel, Knee, Pitch and Roll/Rotate motors in each leg. On the screen left centre are the Input angles written into the slaves and at the top are the achieved Deg angles as measured by the servo pots. Excel is set to colour any differences of more than 2 degs.

Bottom left we see the Max permitted PWM values written into the slaves. Duty shows the PWM moving average values measured over one second. Motors are driven at twice the nominal voltage so these checks are important. Again Excel is set up here to colour any value over 80.

Entering 16 angles to test one posture can be time consuming. PLX-DAQ also allows for values to be taken from the spread sheet and sent on. The green boxes are for such use and can be used, or not, with switches in the master software. Best to disconnect whilst making changes to a number of fields.

To the right we have more green boxes for Calibrating the total build of the bot. This allows the position of each motor spline to be aligned with the limb as required. Ref shows the slave register value which will eventually be transferred to the slave default startup code.

Top right are values for IK experiments. Each slave can calculate the angles (Input) given IKx and IKy in mm. Ikw controls the Roll/Rotate motors.

Lastly there are two spare blocks of display; best to code these up front as adding sections later is a pain. Each foot switch FSw shows ground contact and is useful in determining terrain and construction inaccuracies.

The master Nano has direct contact with an IMU for Pitch and Roll info. The User1 tick box is handy for stepping through sequences.

PLX-DAQ Messaging

The download includes a good help file which explains the protocol. Here we see how a simple change to a print string can make a difference to the display appeal.

  Serial.print ("CELL,SET,"); 
  Serial.write (excol);             //byte value ASCII D
  Serial.print (PLXrow);            //integer value 20
  Serial.print (",");
  Serial.print (PLXduty);           //integer value 81
  Serial.println (",");

This sets the value 81 into cell D20 to display HR Duty P.

  Serial.print ("MSG, 100 tiltR ");   
  Serial.print (tiltR); 
  Serial.print ("  tiltP ");   
  Serial.print (tiltP); 
  Serial.println (","); 

This might write 100 tiltR -0.2  tiltP 16 into the diagnostic message line.

PLX-DAQ GET

A bit trickier here because the protocol is asynchronous and without message numbering or acknowledgement. We send a request then must wait patiently for a response. I include a timeout and then move on if it fails to arrive.

  Serial.print ("CELL,GET,");     
  Serial.write (excol);
  Serial.print (PLXrow); 
  Serial.println (",");             //send request for cell value
.
.
.
.
  if (Serial.available() > 1)
  setpoint = Serial.parseInt();     //parse reply


I have found PLX-DAQ an invaluable tool and highly recommend it.

 

* Search


* Recent Topics

Fun Fact by Impala
[February 13, 2019, 11:05:01 PM]


Animabot Rev3 - Advanced Hexapod Robot by Smashley
[February 05, 2019, 03:41:50 PM]


MKS Gen L 1.0 by printergreg
[February 03, 2019, 12:41:10 PM]


Finally tried out a Chinese PCB service by Bajdi
[February 02, 2019, 08:40:49 AM]


PLX-DAQ by BaldwinK
[January 16, 2019, 06:44:18 AM]


Four Motor Leg Module by BaldwinK
[January 09, 2019, 04:55:14 PM]


Android Adware by Diegotorry
[January 08, 2019, 05:34:48 AM]


Hi, Mushroom glue here. by Diegotorry
[January 08, 2019, 05:31:52 AM]


Solid Works maker license 1 year Free!! by maelh
[January 04, 2019, 01:50:08 PM]


Merry Christmas by Protowrxs
[December 28, 2018, 11:44:25 PM]


Ultralite or flying car of sorts by Impala
[December 27, 2018, 09:30:02 PM]


Web TIme API - by Gareth
[December 07, 2018, 04:34:37 PM]


API Directory by Gareth
[December 06, 2018, 03:34:16 PM]


The Original Prusa I3 Mk3 by tinhead
[November 30, 2018, 02:49:52 PM]


Email notifications by CraigCox
[November 28, 2018, 10:26:06 PM]

* Recent Posts

Re: Fun Fact by Impala
[February 13, 2019, 11:05:01 PM]


Re: Animabot Rev3 - Advanced Hexapod Robot by Smashley
[February 05, 2019, 03:41:50 PM]


Re: MKS Gen L 1.0 by printergreg
[February 03, 2019, 12:41:10 PM]


Re: Finally tried out a Chinese PCB service by Bajdi
[February 02, 2019, 08:40:49 AM]


Finally tried out a Chinese PCB service by jscottb
[February 01, 2019, 11:26:19 AM]


Re: MKS Gen L 1.0 by jinx
[January 29, 2019, 07:31:47 AM]


Re: MKS Gen L 1.0 by printergreg
[January 26, 2019, 04:03:15 PM]


Re: MKS Gen L 1.0 by jimmyeao
[January 20, 2019, 12:15:32 PM]


Animabot Rev3 - Advanced Hexapod Robot by Nemesis
[January 17, 2019, 09:34:32 AM]


PLX-DAQ by BaldwinK
[January 16, 2019, 06:44:18 AM]


Re: Four Motor Leg Module by BaldwinK
[January 09, 2019, 04:55:14 PM]


Re: Android Adware by Diegotorry
[January 08, 2019, 05:34:48 AM]


Re: Hi, Mushroom glue here. by Diegotorry
[January 08, 2019, 05:31:52 AM]


Re: Solid Works maker license 1 year Free!! by maelh
[January 04, 2019, 01:50:08 PM]


Solid Works maker license 1 year Free!! by tinhead
[January 02, 2019, 06:15:07 AM]