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 Community

Author Topic: PLX-DAQ  (Read 548 times)


  • Member
  • ****
  • B
  • Posts: 20
« 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 (202.47 kB . 798x459 - viewed 57 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.


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

Servo Calibrator by Bajdi
[May 24, 2019, 04:01:10 AM]

MKS Gen L 1.0 by Bappi
[May 21, 2019, 07:22:54 PM]

ESP32 "Life is Life" 64x32 flexible P4 RGB LED by jinx
[May 18, 2019, 11:19:44 AM]

Warco HV-4" Rotary Table by jinx
[May 08, 2019, 03:12:58 PM]

Warco WM14 milling machine by jinx
[April 28, 2019, 09:41:40 AM]

MKS GEN L Servo Issue by Reywas
[April 22, 2019, 09:10:08 PM]

Meowth Abandoned by Nemesis
[April 11, 2019, 11:08:00 AM]

Bench Power: Help a rebel out by jinx
[April 03, 2019, 04:20:10 AM]

Just a short intro... by MEgg
[March 18, 2019, 05:49:28 PM]

Yes I am alive! by jinx
[March 10, 2019, 04:38:53 AM]

CZ-1 2.0: problems, calibration and printing, part2 by MEgg
[February 26, 2019, 03:35:15 PM]

Hi, Mushroom glue here. by nschreiber0813
[February 25, 2019, 02:09:13 PM]

Arduino IK by BaldwinK
[February 25, 2019, 05:54:44 AM]

Raspberry Pi / Python eBook - free for the next 11 hours! by MEgg
[February 24, 2019, 09:49:43 AM]

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

* Recent Posts

Re: Servo Calibrator by Bajdi
[May 24, 2019, 04:01:10 AM]

Re: Servo Calibrator by jinx
[May 22, 2019, 02:28:13 AM]

Re: MKS Gen L 1.0 by Bappi
[May 21, 2019, 07:22:54 PM]

Re: MKS Gen L 1.0 by jinx
[May 21, 2019, 03:27:08 PM]

Re: MKS Gen L 1.0 by Bappi
[May 21, 2019, 03:11:45 PM]

Servo Calibrator by BaldwinK
[May 21, 2019, 10:20:42 AM]

Re: MKS Gen L 1.0 by jinx
[May 21, 2019, 05:09:27 AM]

Re: MKS Gen L 1.0 by Bappi
[May 21, 2019, 03:34:54 AM]

Re: MKS Gen L 1.0 by jinx
[May 21, 2019, 02:28:17 AM]

Re: MKS Gen L 1.0 by Bappi
[May 20, 2019, 07:11:31 PM]

Re: MKS Gen L 1.0 by jinx
[May 20, 2019, 03:16:02 PM]

Re: MKS Gen L 1.0 by Bappi
[May 20, 2019, 02:53:00 PM]

Re: MKS Gen L 1.0 by jinx
[May 20, 2019, 03:31:49 AM]

Re: MKS Gen L 1.0 by Bappi
[May 19, 2019, 07:16:21 PM]

Re: MKS Gen L 1.0 by Bappi
[May 19, 2019, 04:04:47 PM]