LIFA digital outputs being set by init.vi

I wrote a 4 bit logic control VI with the LabVIEW Interface for Arduino(LIFA) and I am testing it with LEDs. I've attached a pic of the block diagram and the VI itself. Something funny is happening and I can't figure it out. When I run it, the 3 LSB bits of the array turn on regardless of what my front panel controls are set at, then the proper ones turn on/off after maybe half a second. After that it works fine and I can control each bit properly.

I turned on LabVIEW's execution highlighting and ran it and discovered those pins are turning on during the init.vi. After I stop the VI(stop button for while loop), the bits remain in their last state, when I rerun it, during the init.vi all bits turn off for a split second, then the 3 LSB bits turn on for a split second(regardless of front panel controls), then they turn on/off to reflect the front panel.

Another piece of info: If I unplug the usb cable then replug, those same 3 bits come on, regardless of what they were before I unplugged the cable. Seems to be some sort of default. If it is, how can I set the default for all digital pins to be off? Please help.

4 Bit Logic Control array.vi (11 KB)

Your Arduino code? If that has a problem, we can help. Otherwise, you are in the wrong place,

PaulS:
Your Arduino code? If that has a problem, we can help. Otherwise, you are in the wrong place,

I'm sure many people on this forum know how to use LIFA. There's no rule that says "programming questions" is only for C++.

1 Like