LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to communicate with gsm sim 900a using lab view

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

 

0 Kudos
Message 1 of 14
(4,487 Views)

Hi Carlnis,

 

can some on help me with my block diagram for this problem.

You didn't attach your VI ("your block diagram").

And you didn't told us about your problem…

 

All you wrote is a description of your task!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 14
(4,467 Views)

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.

 

 

gsm try 21.JPG

0 Kudos
Message 3 of 14
(4,446 Views)

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.

Message 4 of 14
(4,438 Views)

Hi Sir
May you help me correct this block diagram,
Please sir,
I just start using Lab View for past 3 day and i really don't know a much about it and still struggling.
It would be nice if you help me sir.
Thanks a lot sir.
 I have attach the file.

 

0 Kudos
Message 5 of 14
(4,421 Views)

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.

0 Kudos
Message 6 of 14
(4,417 Views)

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.

 

0 Kudos
Message 7 of 14
(4,412 Views)

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.

0 Kudos
Message 8 of 14
(4,404 Views)

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

 

 

0 Kudos
Message 9 of 14
(4,387 Views)

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.  

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 10 of 14
(4,379 Views)