plx-daq

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.

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);

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.

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

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);

}