Go Down

Topic: plx-daq (Read 1 time) previous topic - next topic

goldenclan

is there a library for PLX-DAQ?  I got it working but it was not very pretty!  Its control and directives needed to be in all caps with the values comma separated.   This was the only way I could get the data to show up in the excel program.
Code: [Select]
int val = 0;
int val1 = 0;

void setup() {
     Serial.begin(9600);      // opens serial port, sets data rate to 9600 bps
       //int val = 0;
}

void loop() {
delay(500);
val++;
if (val > 29) Serial.println("CLEARDATA");
Serial.print(byte(68));
Serial.print(byte(65));
Serial.print(byte(84));
Serial.print(byte(65));
Serial.print(byte(44));
Serial.print("TIME");
Serial.print(byte(44));
Serial.println(val1);
//if (val > 29) Serial.println("CLEARDATA");
if (val > 29) val = 0;
val1 = random(50, 75);

goldenclan

ok, was doing things the hard way.  Took a step back and now I see how easy it was to do.  I need a board so I can smack my self in the head!  But hey, I did learn something and that is the big thing.

kenkoknz

Hi,
I am new to Arduino and  plx-daq. Very interested in your sketch to talk to plx....can you post new 'easy way' sketch on how you communicate with plx?
Thanks,
k

kenkoknz

After mucking around a bit, maybe something like this? -not sure if this is the most efficient way.

int val = 0;
int val1 = 0;
void setup() {
     Serial.begin(9600);      // opens serial port, sets data rate to 9600 bps
       //int val = 0;
       Serial.println("CLEARDATA");
}

void loop() {
Serial.print("DATA,TIME,");
Serial.println(val1);
val1 = random(0, 100);
delay(3000);

}

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy