LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Solenoid Control using LabView and Arduino

Thank you for your recommendation, I will try to attach de VI in the afternoon because at this moment I do not have the computer which I used to created it.

I tried to "translate" the sketch used, that is why all the pins are configured in the VI but, as you said, it is possible to avoid them.

Thank you

0 Kudos
Message 41 of 53
(2,182 Views)

I highly recommend that you not use LIFA if possible, instead, use LINX.  LIFA is old and unsupported.  LINX is currently supported and is more convenient than LIFA.

0 Kudos
Message 42 of 53
(2,182 Views)

I have created your script myself and it does not work. I attach it in case you want to give a look at it, but I think I copied exactly what you sent me.

I have tried both with Arduino Uno and Mega (although I have the motor shield version, but there was not this option).

Flavia

0 Kudos
Message 43 of 53
(2,182 Views)

Did you load the LIFA_Base.ino into your Arduino Uno board?

Is the COM port the correct one? I mean, did you select the COM port assigned to your Arduino Uno board?

You need to download the LIFA_Base.ino into your Arduino Board, if not, it will not be able to work.

I tried to translate the sketch you sent me, I tested it and it worked as you sketch.

Please, let me know the procedure you use to work with Arduino and the LIFA toolkit.

I have attached the *.vi file if you want to check it.

0 Kudos
Message 44 of 53
(2,182 Views)

Now the situation is becoming weird.

I could switch on a LED connected to another Arduino UNO board (via Labview). So this should mean that my LIFA was installed properly. However I have tried to re-upload the LIFA_Base.ino into my Arduino and I have discovered that I do not have a LIFA_Base.ino in the path suggested (C:\Program Files\National Instruments\LabVIEW 201x\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base). So I have tried to reinstall LIFA, but when I download VIPM I get the error attached. I had fighted a lot with this error in the past and at the end I discovered that my University network was preventing me to fully download VIPM. Indeed when I brought the laptop at home I managed to download everything perfectly fine and that's how I ended up controlling a LED with the Arduino board. However, now I am at home and I get this error and I have checked that in Labview Options there is the right port specified and localhost ticked. I thought in downloading LINX as suggested, but after clicking Install, selecting Digilent LINX and MarkerHub Toolbox, I get the same error.

any idea?

Dr Flavia Cardini

Senior Lecturer in Psychology

Department of Psychology

Faculty of Science and Technology

Anglia Ruskin University

Cambridge

CB1 1PT

0845 196 2346

0 Kudos
Message 45 of 53
(2,182 Views)

Please check the following link.

The page talk about the issue you have.

http://support.jki.net/entries/21447601-Resolving-issues-with-VIPM-connecting-to-LabVIEW

0 Kudos
Message 46 of 53
(2,182 Views)

It worked once and then the script stopped working! let me play with it more and will get back to you. I hope we are nearly there!!

Flavia

Dr Flavia Cardini

Senior Lecturer in Psychology

Department of Psychology

Faculty of Science and Technology

Anglia Ruskin University

Cambridge

CB1 1PT

0845 196 2346

0 Kudos
Message 47 of 53
(2,182 Views)

That sounds good. But, remember, you need to download the LIFA_Base.ino sketch into your Arduino board; probably you will see some error messages, if that happen check the link below

https://decibel.ni.com/content/message/125048#125048#125048

0 Kudos
Message 48 of 53
(2,182 Views)

It seems working!!!

I have just replaced the stop button with a boolean True and it runs fine!

I need to do some extra tests to be sure, but I think you really solved my problem!!!

thank you so much!!

Flavia

Dr Flavia Cardini

Senior Lecturer in Psychology

Department of Psychology

Faculty of Science and Technology

Anglia Ruskin University

Cambridge

CB1 1PT

0845 196 2346

0 Kudos
Message 49 of 53
(2,182 Views)

Replacing the stop button with a true means that the loop only runs once (the same as if you didn't have a loop at all).  How much different is your VI now compared the he one posted by Daniel?

Also, again, I'd recommend upgrading to LINX.

0 Kudos
Message 50 of 53
(2,182 Views)