LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

5003 Error using Arduino - but works in part of structure

error 5003.jpg

hi,

I have a vi for reading, recording and playing back a voltage read on channel 0 of an Arduino Uno.

In read mode (manual) the software works and the arduino reads the signal input (displayed on the indicator Arduino Reading on the front pannel) from pin A0, however as soon as i try and record the signal I get the 5003 error above.

I don't understand how it can read the Arduino signal in one state, but give this error in the next. I've been through numerous threads on here but not found a solution.

Any help will be appreciated. I've attached the Vi's.

I'm using labview 2010.

0 Kudos
Message 1 of 5
(4,237 Views)

When you choose manual mode the sequence of events is as follows:

Instr Init > Acquire > Instr Close > Wait for User

But when you choose record mode you get:

Wait for Record to Start > Acquire > Instr Close > Wait for User

Notice that you never initilize the Arduino when you do choose record mode.

0 Kudos
Message 2 of 5
(2,914 Views)

Nathan_B,

Thankyou, that makes sense. However i'm new to state structures and am insure how to fix this.

I think i'm correct in sayint that i want to make the sequence for record:

Instr Init > Wait for Record to Start > Acquire > Instr Close > Wait for User

However, I don't know how to do this. I've tried changing the start of the record sequence (???) the blue box (see image below) to "Instr Init" but then it is just the same as the manual mode as it does not initiate the instrument and then move onto recording the data. How do i shange the sequence for Record to Instr Init > Wait for Record to Start > Acquire > Instr Close > Wait for User ?

wait for user.jpg

0 Kudos
Message 3 of 5
(2,914 Views)

A quick fix could be to make a "record" specific init state (basically a duplicate of the existing one but the next state would be "Wait for Record to Start").

0 Kudos
Message 4 of 5
(2,914 Views)

Thanks for the help, i've got it working now (attached). I suspect that there is a more elegant way, but this is functioning so i'm happy.

0 Kudos
Message 5 of 5
(2,914 Views)