10-25-2018 03:50 AM
Hi i am an electrical engineering student who is new to Lab view, can some on help me with my block diagram for this problem.
I am using a:
-2 water level sensors
-1 arduino
-1 gsm sim900a
The idea is when the water rises and warning detected by the sensor a signal will be send to lab view and data are collected in excel doc and this will trigger the lab view to send message to the user to evacuate.
Please help me with my final year project
Thank You
10-25-2018 05:31 AM
10-26-2018 11:21 PM
Hi sir GerdW
i have attach the file and pic of the block diagram currently i am having trouble for sending message from gsm Sim 900a to my phone
Sorry for the late reply.
10-27-2018 10:39 AM - edited 10-27-2018 10:41 AM
I see a few problems.
1. The Serial configure belongs before the while loop, it shouldn't be executing on every iteration of the while loop.
2. Get rid of the feedback nodes after the loop on the VISA reference and the error wire. I don't know why you would have put them in there, but you are effectively closing the VISA reference and displaying the error from the previous time you ran the VI.
3. Why is Com3 going to both the serial port and the Arduino functions? Aren't they two different devices? They should each have their own Com port.
4. Is is hard to tell where some of those wires are going because they are running backwards and going into the wrong parts of the functions. Use Block Diagram Cleanup.
Were you getting any error messages? If so, you should post what the error number is and what the message says.
10-27-2018 11:23 PM
10-28-2018 12:19 AM
What serial port is your Arduino connected to?
What serial port is your GSM SIM 900a connected to?
They can't both be connected to com3 which is the way you programmed your VI.
10-28-2018 03:24 AM
Hi Sir,
What serial port is your Arduino connected to?
My arduino is connected to com 3.
What serial port is your GSM SIM 900a connected to?
My GSM is connected to my arduino as a normal connection by using normal connection
RX =pin 10
TX= pin 11
D/Input on arduino uno
The reason why i assigned both on com 3 because i am connection the GSM to my arduino.
And my arduino uno is connected to my com3 serial port.
10-28-2018 07:18 AM
So the GSM is not connected to Com3 at all!
You need to program the Arduino to send the commands to Com3. It will need to take whatever commands that LabVIEW passed to it through Com3, then turn around and write those commands to the GSM device.
10-29-2018 12:59 AM
Hi Sir
So the GSM is not connected to Com 3 at all!
Nope sir,it does not connected to Com 3
My arduino is the one connected to COM 3
You need to program the Arduino to send the commands to Com3. It will need to take whatever commands that LabVIEW passed to it through Com3.)How do i do this sir?
So far i have connected the arduino to LabView 2017.
and my GSM is connected to arduino itself.
But for now how do i make my lab view to sent message to my phone if there is a warning or certain parameter?
i am stuck here sir
10-29-2018 09:55 AM
Have you written the software (in Arduino parlance a 'sketch') that reads your sensors? Since the you want to talk to the GSM module on pins 10,11 you will need to use what is called SoftwareSerial to do so. You need to reserve the hardware serial port (pins 0,1) for communication to your computer. My suggestion is to research using your GSM module with arduino first without even getting LabVIEW into the picture. There are instructables out there on how to do that. Once you can send messages over your GSM module try to incorporate your sensors readings in to the sketch. Once you do that figure out how to send/receive messages from the arduino using the Arduino Serial Monitor. Replicate that in LabVIEW without using LIFA or Lynx.