Go Down

Topic: PLX-DAQ version 2 - now with 64 bit support! (and further new features) (Read 70905 times) previous topic - next topic

freakapotumas

Hello,

I've upgraded to the PLXdaq v2 and I've got a project built that uses a baud rate of 115200.  I can't seem to get any data to the plx spreadsheet despite getting data to my serial monitor in the arduino IDE.  I'm wondering if an inability to read at that specific baud rate is what's causing my problems.  I can probably go down to 9600 but it would just involve taking apart this machine so I can reprogram but that is my absolute last resort.

Thanks

petery2016




Hi Peter,
that is a very interesting feature and you are right, that was not possible - until now  :D  8) .

Attached you can find a "special" version of PLX DAQ v2.11 in which I extended the "ROW,SET" command.
Now you have an additional option for the third parameter:
  • ROW,SET,LATEST ==> will put the row counter to the latest row filled (according to column A). I suggest to place 'serial.println("ROW,SET,LATEST");' as a command into your setup function - thus data transferred by Arduino to PLX DAQ will always start being logged to the latest new line on the current sheet
  • ROW,SET,241 ==> will further work like in the past (whereby 241 can be replaced by any specific row number of course)

I would really appreciate if you could give a short feedback whether or not the new code is working. I tested on my setup and it was running well.

Greetings

Jonathan
Hi Jonathan,

Sorry for late reply. I just tried your special version recently and it WORKS PERFECTLY!!
This helps me a lot,thanks for your amazing support!!


Thanks,
Peter

kostasb

Hello,

Is it possible to work with Nano or Pro mini?
(I just started using Arduino.)

Thanks
Kostas

manacapleo321

#include <SPI.h>
#include <MFRC522.h>
#include <LiquidCrystal.h>
 
#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.

#define beep_pin 8

LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

int i = 0;

void setup(void)
{
   
    Serial.begin(9600);   // Initiate a serial communication
  Serial.println("CLEARSHEET"); // clears sheet starting at row 1   
     Serial.println( (String)"LABEL,Date,Time,name");
     delay(1000);
     
  pinMode(beep_pin,OUTPUT);
  digitalWrite(beep_pin,LOW);

   
  lcd.begin(16, 2);
  lcd.setCursor(3, 1);
  lcd.print("Welcome!!");
  lcd.setCursor(0, 0);
  lcd.print("Circuit is Ready");
  delay(1500);
  lcd.clear(); 
 
   
  SPI.begin();      // Initiate  SPI bus
  mfrc522.PCD_Init();   // Initiate MFRC522
  Serial.println("Put your card to the reader...");

}
void loop(void)
{
 
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Put your card to");
  lcd.setCursor(0, 1);
  lcd.print("the reader......");
  delay(300);

 
   
  // Look for new cards
  if ( ! mfrc522.PICC_IsNewCardPresent())
  {
    return;
  }
  // Select one of the cards
  if ( ! mfrc522.PICC_ReadCardSerial())
  {
    return;
  }
  //Show UID on serial monitor
  Serial.print("UID tag :");
  String content= "";
  byte letter;
  for (byte i = 0; i < mfrc522.uid.size; i++)
  {
     Serial.print(mfrc522.uid.uidByte < 0x10 ? " 0" : " ");
     Serial.print(mfrc522.uid.uidByte, HEX);
     content.concat(String(mfrc522.uid.uidByte < 0x10 ? " 0" : " "));
     content.concat(String(mfrc522.uid.uidByte, HEX));
  }
  Serial.println();
  Serial.print("Message : ");
  content.toUpperCase();
 

 
  if (content.substring(1) == "E0 87 34 1A") //change here the UID of the card/cards that you want to give access
  {
    digitalWrite(beep_pin,HIGH);
    delay(200);
    digitalWrite(beep_pin,LOW);
    delay(100);
    lcd.setCursor(0, 0);
    lcd.print("ID : ");
    lcd.print(content.substring(1));
    lcd.setCursor(0, 1);
    lcd.print("Leo Aude Manacap");
    Serial.println("Leo Aude Manacap");
    delay(1200);     
  }
 
 else   {
    digitalWrite(beep_pin,HIGH);
    lcd.setCursor(0, 0);
    lcd.print("ID : ");
    lcd.print(content.substring(1));
    lcd.setCursor(0, 1);
    lcd.print("Access denied");
    Serial.println(" Access denied");
    delay(1500);
     }
}


GUYS CAN YOU HELP PLEASE I DONT KNOW HOW TO .. GUys pLease i Need this for the sake of our Grade , Please

BTW. It is all about RFID based attendance Monitoring Please Guuys.. Help me Thank you :D

Velkrome

Hello, i'm using PLX-DAQ for my project. I've successfully received data from my Arduino to my Excel file via USB serial COM using PLX-DAQ. However, i'm now trying to send the data over via Bluetooth serial COM. It works and I can receive my data in the serial monitor in arduino IDE. However, the command for sending the data via Bluetooth is BTserial.println but PLX-DAQ only detect Serial.println so my data isn't getting imported into Excel. Is there a way to change the trigger command from Serial.println to BTserial.println? I don't know much about VBA so I can't change it myself.

manacapleo321

GUYS I NEED YOUR HELP PLEASE HOW CAN THE MESSAGE SEND TO EXCEL once we tap a Card into a RFID
#include <SPI.h>
#include <MFRC522.h>
#include <LiquidCrystal.h>
 
#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.

#define beep_pin 8

LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
 
 int i = 9;
 
void setup()
{
  Serial.begin(9600);               //Fastest baudrate
  Serial.println("CLEARDATA");
 Serial.println("LABEL,Date,Time,Name,Message");

 
  pinMode(beep_pin,OUTPUT);
  digitalWrite(beep_pin,LOW);
 
  lcd.begin(16, 2);
  lcd.setCursor(3, 1);
  lcd.print("Welcome!!");
  lcd.setCursor(0, 0);
  lcd.print("Circuit is Ready");
  delay(1500);
  lcd.clear(); 
 
   
  SPI.begin();      // Initiate  SPI bus
  mfrc522.PCD_Init();   // Initiate MFRC522
  Serial.println("Put your card to the reader...");
  Serial.println();

 

}
void loop()
{

  Serial.print("DATA,TIME,");
   Serial.print(i++); Serial.print(",");
    Serial.println(millis());
}
                   
  digitalWrite(beep_pin, LOW);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Put your card to");
  lcd.setCursor(0, 1);
  lcd.print("the reader......");
  delay(200);
 
  // Look for new cards
  if ( ! mfrc522.PICC_IsNewCardPresent())
  {
    return;
  }
  // Select one of the cards
  if ( ! mfrc522.PICC_ReadCardSerial())
  {
    return;
  }
 
 

  //Show UID on serial monitor
  Serial.print("UID tag :");
  String content= "";
  byte letter;
  for (byte i = 0; i < mfrc522.uid.size; i++)
  {
     Serial.print(mfrc522.uid.uidByte < 0x10 ? " 0" : " ");
     Serial.print(mfrc522.uid.uidByte, HEX);
     content.concat(String(mfrc522.uid.uidByte < 0x10 ? " 0" : " "));
     content.concat(String(mfrc522.uid.uidByte, HEX));
  }
       
  Serial.println();
  Serial.print("Message : ");
  content.toUpperCase();
       

 
  if (content.substring(1) == "E0 87 34 1A")//change here the UID of the card/cards that you want to give access
 
  {
   
  Serial.print("DATA,TIME,");
  Serial.print(",");
 
    digitalWrite(beep_pin,HIGH);
    delay(200);
    digitalWrite(beep_pin,LOW);
    delay(100);
    lcd.setCursor(0, 0);
    lcd.print("ID : ");
    lcd.print(content.substring(1));
    lcd.setCursor(0, 1);
    lcd.print("You are Log in!!");
    Serial.println("Leo Aude C. Manacap");
    delay(1200);     
  }
 
 else   {
    digitalWrite(beep_pin,HIGH);
    lcd.setCursor(0, 0);
    lcd.print("ID : ");
    lcd.print(content.substring(1));
    lcd.setCursor(0, 1);
    lcd.print("Access denied");
    Serial.println(" Access denied");
    delay(1500);
     }
}





futi

How about "TX: Transmit" data transmission in the opposite direction?
Is it possible?

tasmod

Hi NetDevil,

Many thanks for your amazing work.

I am working on a windspeed indicator using a Nano and currently have it working OK but need some help refining the Excel part.

I used PLX-DAQ original and setup the parameters for a dynamic graph.  It scales nicely according to the input on the vertical axis.  I limited it to one hour of display else it wan't possible to comfortably see the data.
However it doesn't quite do what I want in respect of the graph lines for the data.  I have to set the graph type to one with data points so that the further data can be seen.

The data consists of one second windspeed (which graphs nicely) and a 2 minute average of the previous values. Along with this is the maximum gust speed.
For metrological purposes the windspeed is given over the 2 minute period average along with the gust speed.

In the graph I get the speed as the line graph but the average and the max gust only show up on a data point chart display. Even then they are only shown as points. Ideally I would have liked the average to line graph as well.

I set your PLX-DAQ v2.11 up to match the parameters and get the same result but the graph line is thicker (?) I can't seem to find how to change that!

Apart from the above there is one thing I would really like and that is for the graph to act like a strip recorder or at least to restart when the hours sampling finishes. At the moment it just stops.
I understand that just disconnecting and reconnecting with reset will restart the sampling all over again but it would be nice if I could make it say 30 minutes with an automatic restart.  Is that possible?

Rob

tasmod

OK I'm no VB programmer but using your mantra.."Even you can do it"  I looked at the frm vb code.

Now I think if I create a new    Case "CHART"     function I can call it from the Arduino and it will run.

I suspect if I added the reset code to this it would clear the chart and start again.  But, I'm not sure which part is the reset code ! 
However I used your ROW function using a timer in the Arduino code and had the data restart at Row 2 again. At least that's something.

I then found via google this line    Chart1.Series[0].Points.Clear()  as a way to clear the chart plotted points. 
I don't know how to incorporate this though.  I did try but only succeeded in creating errors.....

Rob

tasmod

OK I found that CLEARDATA will reset the chart but it seems I need to examine the Arduino code as after one new reading it halts.

glaimmy

Hi glaimmy,
for that I suggest you simply add a counter to your Arduino code and use SAVEWORKBOOKAS to include said counter.
In case you restart your Arduino and need to have a unique number even after restart maybe use the random command provided by PLX DAQ to replace the counter.

Of course: best would be to rewrite SAVEWORKBOOKAS function in Excel with the code to save the workbook by pattern 'PassedNameByArduino' + '_' + CurrentDate + '_' + CurrentTime + '.xls'. By that you would never override an existing workbook.
Currently I cannot provide you with that solution as I don't have access to a Windows PC (to use Excel). But it is not that hard to do ;)

Greetings
Thank you very much for your guidance.
I will try again!

ThisIsFun

Hi all,

I'm using PLX-DAQ v2 to gather temperature data from 16 DS18B20 temp probes. The program works great and I'm receiving data in Excel. However, I'd like to know how to specify the collection rate. For example, if I want a temperature reading recorded every 20 sec.

Thanks in advance!

Here's my code and an image for reference:


Code: [Select]
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS_PIN 2

OneWire oneWire(ONE_WIRE_BUS_PIN);
DallasTemperature sensors(&oneWire);
 
DeviceAddress Probe01 = { 0x28, 0xE4, 0x35, 0xA8, 0x04, 0x00, 0x00, 0x96 }; // 1
DeviceAddress Probe02 = { 0x28, 0x2B, 0xA8, 0xA8, 0x04, 0x00, 0x00, 0x76 }; // 2
DeviceAddress Probe03 = { 0x28, 0x90, 0x1B, 0xA8, 0x04, 0x00, 0x00, 0x88 }; // 3
DeviceAddress Probe04 = { 0x28, 0x87, 0xB1, 0xE6, 0x08, 0x00, 0x00, 0x96 }; // 4
DeviceAddress Probe05 = { 0x28, 0x93, 0x9B, 0xE5, 0x08, 0x00, 0x00, 0xDC }; // 5
DeviceAddress Probe06 = { 0x28, 0x49, 0x7F, 0xE2, 0x08, 0x00, 0x00, 0x94 }; // 6
DeviceAddress Probe07 = { 0x28, 0x6C, 0x36, 0xA8, 0x04, 0x00, 0x00, 0x93 }; // 7
DeviceAddress Probe08 = { 0x28, 0xBA, 0xAB, 0xA8, 0x04, 0x00, 0x00, 0xBE }; // 8
DeviceAddress Probe09 = { 0x28, 0x51, 0x78, 0xA8, 0x04, 0x00, 0x00, 0x7F }; // 9
DeviceAddress Probe10 = { 0x28, 0xD4, 0x2A, 0xA8, 0x04, 0x00, 0x00, 0x68 }; // 10
DeviceAddress Probe11 = { 0x28, 0x44, 0xA2, 0xE5, 0x08, 0x00, 0x00, 0xEA }; // 11
DeviceAddress Probe12 = { 0x28, 0x2B, 0x1E, 0xA8, 0x04, 0x00, 0x00, 0xA5 }; // 12
DeviceAddress Probe13 = { 0x28, 0xB8, 0xB3, 0xA8, 0x04, 0x00, 0x00, 0x92 }; // 13
DeviceAddress Probe14 = { 0x28, 0x4F, 0x6C, 0xA8, 0x04, 0x00, 0x00, 0x54 }; // 14
DeviceAddress Probe15 = { 0x28, 0xDB, 0x99, 0xA8, 0x04, 0x00, 0x00, 0x4D }; // 15
DeviceAddress Probe16 = { 0x28, 0xC7, 0x17, 0xA8, 0x04, 0x00, 0x00, 0x02 }; // 16
 

int i = 0;

void setup() {

    Serial.begin(9600);

    Serial.println("CLEARSHEET");
    Serial.println("LABEL,Date,Time,Timer,Counter,millis,Temp1,Temp2,Temp3,Temp4,Temp5,Temp6,Temp7,Temp8,Temp9,Temp10,Temp11,Temp12,Temp13,Temp14,Temp15,Temp16");


    sensors.begin();
    sensors.setResolution(Probe01, 10);
    sensors.setResolution(Probe02, 10);
    sensors.setResolution(Probe03, 10);
    sensors.setResolution(Probe04, 10);
    sensors.setResolution(Probe05, 10);
    sensors.setResolution(Probe06, 10);
    sensors.setResolution(Probe07, 10);
    sensors.setResolution(Probe08, 10);
    sensors.setResolution(Probe09, 10);
    sensors.setResolution(Probe10, 10);
    sensors.setResolution(Probe11, 10);
    sensors.setResolution(Probe12, 10);
    sensors.setResolution(Probe13, 10);
    sensors.setResolution(Probe14, 10);
    sensors.setResolution(Probe15, 10);
    sensors.setResolution(Probe16, 10);
   

}

void loop() {

    sensors.requestTemperatures();
    getTemp(Probe01);
    getTemp(Probe02);
    getTemp(Probe03);
    getTemp(Probe04);
    getTemp(Probe05);
    getTemp(Probe06);
    getTemp(Probe07);
    getTemp(Probe08);
    getTemp(Probe09);
    getTemp(Probe10);
    getTemp(Probe11);
    getTemp(Probe12);
    getTemp(Probe13);
    getTemp(Probe14);
    getTemp(Probe15);
    getTemp(Probe16);

    Serial.println( (String) "DATA,DATE,TIME,TIMER," + i++ + "," + millis() + "," + sensors.getTempC(Probe01) + "," + sensors.getTempC(Probe02) + "," + sensors.getTempC(Probe03) + "," + sensors.getTempC(Probe04) + "," + sensors.getTempC(Probe05) + "," + sensors.getTempC(Probe06) + "," + sensors.getTempC(Probe07) + "," + sensors.getTempC(Probe08) + "," + sensors.getTempC(Probe09) + "," + sensors.getTempC(Probe10) + "," + sensors.getTempC(Probe11) + "," + sensors.getTempC(Probe12) + "," + sensors.getTempC(Probe13) + "," + sensors.getTempC(Probe14) + "," + sensors.getTempC(Probe15) + "," + sensors.getTempC(Probe16) + ",AUTOSCROLL_20" );
   
}

void getTemp(DeviceAddress deviceAddress)
{
  float tempC = sensors.getTempC(deviceAddress);
}

larryd

No technical PMs.
The last thing you did is where you should start looking.

jarus

Excel seems to keep crashing on me. Is it bc of my sample rate? CPU usage goes up to 60% while the app is running but doesn't seem to be draining resources completely. It collects data for about 400 rows and then crashes. I tried baud rate 9600 and 115200. It seems to be more stable if I increase the delay to 100ms (sampling rate of 10Hz) But realistically I need to sample at least 50Hz.

I am using an Arduino Uno, ADXL335, Windows 10 (also tried on windows 7), both 64-bit, tried with Excel 2016 and 2013. Developer mode was activated and macros were allowed to run.

I've spent all day trying to get this to work and I'm starting to get frustrated and I don't know how to fix this. Any help would be much appreciated! Thanks

Below is my code and screenshots of the error messages.

Code: [Select]
float Xread;
float Xrest;
const int Xpin = A0;

float Yread;
float Yrest;
const int Ypin = A1;

float Zread;
float Zrest;
const int Zpin = A2;

float Acceltotal;

const int trig = A3;
float trigread;
float trigprnt;

const int analogtoG = ((.330*1023)/3.3);


void setup() {
  Serial.begin(115200);      // sets the serial port baud rate
  analogReference(EXTERNAL);

  pinMode(Xpin, INPUT);
  
  pinMode(9, OUTPUT);
  digitalWrite (9, HIGH);
  delay(500);
  
  Xrest = analogRead(Xpin);      
  Yrest = analogRead(Ypin);      
  Zrest = analogRead(Zpin);      
 
  delay(499);
  digitalWrite (9, LOW);


  Serial.println("CLEARDATA");

  Serial.println("LABEL,Time,Gforce,Trigger, Millis");
  


}

void loop() {
  delay(1);
  Xread = (analogRead(Xpin) - Xrest)/analogtoG;
  Yread = (analogRead(Ypin) - Yrest)/analogtoG;
  Zread = (analogRead(Zpin) - Zrest)/analogtoG;
  Acceltotal = (abs(Xread) + abs(Yread) + abs(Zread));
  trigread = analogRead(trig);


if (trigread > 1000)
{
  trigprnt=1;
}
else if (trigprnt<1000)
{
  trigprnt=0;
}
 

Serial.print("DATA,TIME,AUTOSCROLL_20,"); Serial.print(Acceltotal, 2); Serial.print(","); Serial.print(trigprnt); Serial.print(",");   Serial.println(millis());




  delay(40);

}




Go Up