07-13-2024 02:21 PM
Hi, I can't connect L1 1D array to the digital I/O pin, I want to know which converter to use
07-14-2024 01:22 PM - edited 07-14-2024 02:42 PM
I don't have your toolkit, but what does it say in the context help if you hover over the input terminal?
Is there a reason you are still using the ancient LIFA instead of LINX?
(also note that you can simplify your comparisons by using an array diagram constant.)
07-15-2024 01:05 AM
Hi Ancien,
@Ancien97 wrote:
I can't connect L1 1D array to the digital I/O pin, I want to know which converter to use
What does your subVI expect as inputs?
(Why don't you use an autoindexing FOR loop to set your 4 DO channels?)
07-30-2024 07:46 AM
Am using LiFA because I think it's better than LINX right?
I done it's projet, actually I want to use sensors ACS712 ans Zmpt101b to acquire current ant voltage!
I want to have the RMS values, I find an Arduino code but I want to translate it in LabView language!
I need help
The code :
Explique moi le code Arduino ci-dessous :
double sensorValue1 = 0;
double sensorValue2 = 0;
int crosscount = 0;
int climb_flag = 0;
int val[100];
int max_v = 0;
double VmaxD = 0;
double VeffD = 0; double Veff = 0;
void setup() {
Serial.begin(9600);
pinMode(A1, INPUT);
}
void loop()
{ for (int i=0; i<100; i++) {
sensorValue1 = analogRead(A1);
if (analogRead(A1) > 511) {
val[i] = sensorValue1; }
else { val[i] = 0; }
delay(1); }
max_v = 0;
for ( int i = 0; i < 100; i++ ) {
if ( val[i] > max_v ) {
max_v = val[i]; }
val[i] = 0; }
if (max_v != 0) {
VmaxD = max_v;
VeffD = VmaxD / sqrt(2);
Veff = (((VeffD - 420.76) / -90.24) * -210.2) + 210.2; }
else { Veff = 0; }
Serial.print("Voltage: "); Serial.println(Veff); VmaxD = 0; delay(100); }
07-30-2024 08:30 AM
The function you are using allows you to write only one digital line at a time.
The input is a number not an array .