8 years, 3 months ago.

mbed RPC example Labview

Hello,

I've made a simple RPC example where 2 doubles are printouts.

int main() {
    while (1) {
        double x;
        double y;

        //x and y are retrieved by I2C protocol from external device

        pc.printf("%.2f\n", x);
        pc.printf("%.2f\n", y);
    }
}

Labview code: /media/uploads/rov/labview_2016-09-09_15-45-24.png

When I run LV, I sometimes see that for some reason the 1st character of y is cut off...

/media/uploads/rov/labview_2016-09-09_15-43-24.png

Value of y is about 24. but sometimes drops to 3., so the number 2 is not shown. If I use a terminal, the issue is not detected.

I've also started playing with delays. Placing the 20ms wait between the "RPC-Variable-read.vi", will move the issue from y to x. Placing a delay after each "read" will give a fixed value for both x and y -> not working... Placing no delay, issue still on y. Changing the call of variable from x and y to y then x, will move the issue to x.

Somebody any idea what could cause this issue?

Be the first to answer this question.