Académique Documents
Professionnel Documents
Culture Documents
Submitted by:
AUDITOR, Marimar L.
DE DIOS, Neil Leander A.
DEL ROSARIO, Mikee I.
DELOS REYES, Vladimer A.
DOMINGO, Ellaine Joy A.
JUMAQUIO, Yeoj Niko G.
ROBERTO, Edzel Daryl P.
ROXAS, Rinna Andrea B.
TALUSAN, Gio Louis C.
TEJADA, Don Albert U.
TIAMA, Paul Patrick M.
TUNGOL, Rachelle Geleen S.
EE163P A11
Submitted to:
Engr. Joseph Bryan Ibarra
Date:
January 11, 2017
1Q/16-17
Project Description
Accomplished:
***** Yung pagbabasa ng data from plc to arduino and sending nung sa gsm.***
Solutions:
o Check if the sim card has a load
o Decrease the baudrate of GSM preferably 1200 or 2400
o Press the power button of GSM board for 2-3 sec
o Press the reset button to re-initialize
Solution:
o Create a ciruit that convert PWM signal to Analog Signal
o Look for possible other settings in CX Programmer
Solution:
o The problem occurs because of different communication protocol
of PLC and Arduino. Their resolution is different so use Scaling.
Solution:
o Restart the PLC and use another channel like channel 201 instead.
Project Objectives
The main objective of the project is monitoring voltage as obtained in the
Programmable Logic Controller connected to a GSM module using printer cable for
wireless monitoring. This project also aims to:
Be able to scale and convert the voltage obtained in the PLC to hexadecimal
with maximum of 255 for matching with the settings of the Arduino.
Be able to create a program for the GSM Board.
Be able to create a program for the PLC Arduino connection via printer cable.
Be able to inform the user of the reading as a reply after sending an SMS
containing the word Voltage.
Be able to inform the user via SMS when the reading exceeds the maximum
value as set.
Be able to inform the user via SMS when the whole module is ready to monitor
voltage.
Be able to establish a connection between the PLC, Arduino, and the GSM
Module.
Materials
CP1H PLC GIZDUINO BOARD
The first rung shows the initialization and declaration of values for data
memories from D100 to D103 indicated by the use of the Always On Flag. The
indicated data memories D100 to D103 are set for scaling in the following rung. The
input ranges from #0 to #1770. The output ranges from #0 to #255. The maximum
output is set to #255 for matching purposes because the maximum value that can be
read by the Arduino is also #255.
Figure 2. Rung 1
In this rung, scaling starts from a data memory D200 for testing purposes. But
the projects main purpose, voltage analog inputs 200 or 201 from the PLC is to be
used as source word. The output of the scale is placed in a data memory D30.
Figure 3. Rung 2
The last rung uses the BCD to Binary converter from the output of the scaling
process which is the data memory D30. This conversion process, which eventually
becomes hexadecimal, is done because Arduino only accepts hexadecimal values in 2
bits. The conversion of 255 to hexadecimal is FF, making it the maximum hexadecimal
value read by the Arduino.
Microcontroller Codes (Arduino)
pos=sms.IsSMSPresent(SMS_ALL); };
//save to variable if there is an SMS
Serial.println((int)pos); //display
position number or index of the
message
if((int)pos>0) //if message from 0-20 is
found
{
Serial.print("Message Received,
INBOX="); //display an output on the
serial monitor
Serial.println((int)pos); //display the
position/index of the message 1 or 0
will be the output
message[0]='Waiting for Message';
//display '0' if no messages found
if (Usb.Init() == -1){
rcode =
OmronPLCsend(sizeof(msg),msg);
void RecPrintHEX(uint16_t nbytes,
return ( rcode); uint8_t* data){
} if(nbytes==0)return;
for(uint16_t i=0; i < nbytes; i++ ) {
Serial.print(" ,0x");
uint8_t Receive_Omron_PLC_D_Write() Serial.print(data[i],HEX);
{
uint8_t rcode; //Serial.println(Omron_PLC_D0_Value,
DEC);
uint8_t buf[64]; //Serial.print(data[i],HEX);
uint16_t rcvd=0; }
rcode = OmronPLCreceived(&rcvd,buf); Serial.println("");
//RecPrintHEX(rcvd,buf); }