LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

external lightining system

i am not getting output and in internal system there is an error i cant rectify it..and in external no errors but output is not coming according to the time what i have set .........please help me 

0 Kudos
Message 1 of 6
(2,530 Views)

good afternoon sravaya1

 

on looking at the external piece of the code, you have the start, write, and stop DAQmx VIs inside the same loop, so basically its going to start the task, write once, then stop the task. If the object is to turn a light on and have it stay on while the digital is high, put the start and stop daq tasks outside of the case structure. you only should have to start and stop the task once, and then just write to the task when needed. I am assuming when the time is reached it is supposed to drive the digital line high and keep it high until it goes low again when the time is out of range? Another thing that you might have overlooked is to put the whole VI, minus the start and stop DAQ vis...in a while loop with a time delay of say 100 mSeconds....the way it is now, its only reading the inputs once and then writing the daq one time. 

 

on the internal piece, pretty much the same thing, put the whole structure inside a while loop with a delay, minus the start and stop VIs...also get rid of the sequence structure, use error nodes instead to force dataflow. I think this might be whats locking up the application. 

 

I would get rid of internal while loop on this one and just have 1 while loop. 

 

Can you also give a more thorough explanation of what you are trying to obtain? A step by step explanation of what you are trying to automate in LabVIEW? 

 

Thanks

 

Steven Howell

LabVIEW Consultant

Arcus Technology Services, LLC

LabVIEW Certified Associate Developer

Steven Howell
Controls and Instrumentation Engineer
Jacobs Technologies
NASA Johnson Space Center
0 Kudos
Message 2 of 6
(2,504 Views)

your error is probably from your Daq starting and stopping many times...as suggested:  place them outside your while loop

 

you could get rid of many boolean functions by using compound arithmetic and using the in-range function for your times

 

you could both read(analog voltage of the sun cell) and write (digital output to the light's relay) to the Daq at the same time in your while loop

 

you can write both digital outputs at the same time using a 1D bool array

 

there seems to be a logic issue with your sun cell (read analog input of the cell voltage)...meaning that you want a green light when it's below a certain level (voltage)?

 

you can do this all in 1 while loop...

0 Kudos
Message 3 of 6
(2,482 Views)

gud mrg sir, as we are doing project regarding this internal light and external light actually we are not getting output for the block diagram what we have sent through ...we want exact block diagram for both internal and external lightning system as these are appliances of smart home.....please do help us  thanks.

0 Kudos
Message 4 of 6
(2,460 Views)

@sravya1 wrote:

...we want exact block diagram for both internal and external lightning system .....


if you read the previous posts....we gave you enough information to complete your programming with good practice and style. it is up to you to do the rest of the work, not up to us to complete it for you?

0 Kudos
Message 5 of 6
(2,454 Views)

how to set the values of suncell according to the day time ....light is glowing for only zero reading

0 Kudos
Message 6 of 6
(2,450 Views)