[quote="mintu, post:8, topic:1353801"]
ACTUATOR DETAILS: Zoom Industrial - Heavy Duty Linear Actuator - 330 Pound Max Lift DC 12v/24v - Position Feedback - Weather Resistant.
ARDUINO MEGA IS INTERFACED WITH LABVIEW 2020 COMMUNITY EDITION THROUGH “LIFA” PROGRAMMING OF ARDUINO SOFTWARE WITH FOLLOWING CODES:
/*********************************************************************************
**
** LVFA_Firmware - Provides Basic Arduino Sketch For Interfacing With LabVIEW.
**
** Written By: Sam Kristoff - National Instruments
** Written On: November 2010
** Last Updated: Dec 2011 - Kevin Fort - National Instruments
**
** This File May Be Modified And Re-Distributed Freely. Original File Content
** Written By Sam Kristoff And Available At LabVIEW Interface for Arduino (LIFA) - NI Community.
**
*********************************************************************************/
/*********************************************************************************
**
** Includes.
**
********************************************************************************/
// Standard includes. These should always be included.
#include <Wire.h>
#include <SPI.h>
#include <Servo.h>
#include "LabVIEWInterface.h"
int relay1 = 40;
int relay2 = 41;
int relay3 = 42;
int relay4 = 43;
int relay5 = 44;
int relay6 = 45;
int relay7 = 46;
int relay8 = 47;
int relay9 = 48;
int relay10= 49;
int relay11= 50;
int relay12= 51;
int relay13= 52;
int relay14= 53;
int sensor1 = 22;
int sensor2 = 23;
int sensor3 = 24;
int sensor4 = 25;
int sensor5 = 26;
int sensor6 = 27;
int sensor7 = 28;
int va11 = 2;
int va12 = 3;
int va13 = 4;
int va14 = 5;
int va15 = 6;
int va16 = 7;
int va17 = 8;
/*********************************************************************************
** setup()
**
** Initialize the Arduino and setup serial communication.
**
** Input: None
** Output: None
*********************************************************************************/
void setup()
{
// Initialize Serial Port With The Default Baud Rate
Serial.begin(250000);
pinMode(sensor1,INPUT);
pinMode(sensor2,INPUT);
pinMode(sensor3,INPUT);
pinMode(sensor4,INPUT);
pinMode(sensor5,INPUT);
pinMode(sensor6,INPUT);
pinMode(sensor7,INPUT);
pinMode(va11,OUTPUT);
pinMode(va12,OUTPUT);
pinMode(va13,OUTPUT);
pinMode(va14,OUTPUT);
pinMode(va15,OUTPUT);
pinMode(va16,OUTPUT);
pinMode(va17,OUTPUT);
pinMode(relay1,OUTPUT);
pinMode(relay2,OUTPUT);
pinMode(relay3,OUTPUT);
pinMode(relay4,OUTPUT);
pinMode(relay5,OUTPUT);
pinMode(relay6,OUTPUT);
pinMode(relay7,OUTPUT);
pinMode(relay8,OUTPUT);
pinMode(relay9,OUTPUT);
pinMode(relay10,OUTPUT);
pinMode(relay11,OUTPUT);
pinMode(relay12,OUTPUT);
pinMode(relay13,OUTPUT);
pinMode(relay14,OUTPUT);
syncLV();
// Place your custom setup code here
}
/*********************************************************************************
** loop()
**
** The main loop. This loop runs continuously on the Arduino. It
** receives and processes serial commands from LabVIEW.
**
** Input: None
** Output: None
*********************************************************************************/
void loop()
{
checkForCommand();
// Place your custom loop code here (this may slow down communication with LabVIEW)
if (acqMode == 1)
{
sampleContinously();
}
}
[/quote]
ACTUATOR DETAILS: Zoom Industrial - Heavy Duty Linear Actuator - 330 Pound Max Lift DC 12v/24v - Position Feedback - Weather Resistant.
ARDUINO MEGA IS INTERFACED WITH LABVIEW 2020 COMMUNITY EDITION THROUGH “LIFA” PROGRAMMING OF ARDUINO SOFTWARE WITH FOLLOWING CODES:
/*********************************************************************************
**
** LVFA_Firmware - Provides Basic Arduino Sketch For Interfacing With LabVIEW.
**
** Written By: Sam Kristoff - National Instruments
** Written On: November 2010
** Last Updated: Dec 2011 - Kevin Fort - National Instruments
**
** This File May Be Modified And Re-Distributed Freely. Original File Content
** Written By Sam Kristoff And Available At www.ni.com/arduino.
**
*********************************************************************************/
/*********************************************************************************
**
** Includes.
**
********************************************************************************/
// Standard includes. These should always be included.
#include <Wire.h>
#include <SPI.h>
#include <Servo.h>
#include "LabVIEWInterface.h"
int relay1 = 40;
int relay2 = 41;
int relay3 = 42;
int relay4 = 43;
int relay5 = 44;
int relay6 = 45;
int relay7 = 46;
int relay8 = 47;
int relay9 = 48;
int relay10= 49;
int relay11= 50;
int relay12= 51;
int relay13= 52;
int relay14= 53;
int sensor1 = 22;
int sensor2 = 23;
int sensor3 = 24;
int sensor4 = 25;
int sensor5 = 26;
int sensor6 = 27;
int sensor7 = 28;
int va11 = 2;
int va12 = 3;
int va13 = 4;
int va14 = 5;
int va15 = 6;
int va16 = 7;
int va17 = 8;
/*********************************************************************************
** setup()
**
** Initialize the Arduino and setup serial communication.
**
** Input: None
** Output: None
*********************************************************************************/
void setup()
{
// Initialize Serial Port With The Default Baud Rate
Serial.begin(250000);
pinMode(sensor1,INPUT);
pinMode(sensor2,INPUT);
pinMode(sensor3,INPUT);
pinMode(sensor4,INPUT);
pinMode(sensor5,INPUT);
pinMode(sensor6,INPUT);
pinMode(sensor7,INPUT);
pinMode(va11,OUTPUT);
pinMode(va12,OUTPUT);
pinMode(va13,OUTPUT);
pinMode(va14,OUTPUT);
pinMode(va15,OUTPUT);
pinMode(va16,OUTPUT);
pinMode(va17,OUTPUT);
pinMode(relay1,OUTPUT);
pinMode(relay2,OUTPUT);
pinMode(relay3,OUTPUT);
pinMode(relay4,OUTPUT);
pinMode(relay5,OUTPUT);
pinMode(relay6,OUTPUT);
pinMode(relay7,OUTPUT);
pinMode(relay8,OUTPUT);
pinMode(relay9,OUTPUT);
pinMode(relay10,OUTPUT);
pinMode(relay11,OUTPUT);
pinMode(relay12,OUTPUT);
pinMode(relay13,OUTPUT);
pinMode(relay14,OUTPUT);
syncLV();
// Place your custom setup code here
}
/*********************************************************************************
** loop()
**
** The main loop. This loop runs continuously on the Arduino. It
** receives and processes serial commands from LabVIEW.
**
** Input: None
** Output: None
*********************************************************************************/
void loop()
{
checkForCommand();
// Place your custom loop code here (this may slow down communication with LabVIEW)
if (acqMode == 1)
{
sampleContinously();
}
}
type or paste code here