Simulation Analog Input and Output Programming in Simatic S7-PLCSim
Simulation Analog Input and Output Programming in Simatic S7-PLCSim
Ads by Google
1.PLC Software
2.PLC Program
In PLC there are two kind input/output, there are Digital and analog. Digital input/output only have two condition
TRUE and FALSE, or ENERGIZE and DE-ENERGIZE. In field this defined as ON and OFF.
Different with Digital, analog input/output not read True and False. Analog input/output read data changes linearly.
In Field instrument like sensor, transmitter, receiver, they produce voltage from 0 24 V (maximum voltage can be
different depend specification). Voltage changes from 0 -24 v can read by PLC trough Analog Input/output.
In this part, we will simulates the analog input and output PLC Programming with Simatic S7-PLCSim. Please
follow the step by step to simulate Analog input/output programming in Simatic S7-PLCSim.
Expand the Simatic 300, in Folder Rack 300 select Rail and Drag into left Panel.
In left panel, will show a Rack Column. This Rack Column represent a rail in Simatic 300 station, we can put Power
Supply, CPU, Input and Output Module in this Rail.
Figure 3 Rail f or Power Supply , CPU, Input and Output Module
Open CPU-300 folder, and choose the CPU which will used in Project. In this case I use CPU 312. Select the CPU-
312 and drag into Rack Column no 2. Number in Rack Column is represent the order each module in Rail.
Open folder SM-300, in this folder we can choose AI, AO that we need. Open folder AI-300 and select SM 331 AI 2
x 12 Bit. Drag into Rack Column. This represent the Analog Input Module SM 331 with 2 Input analog and 12 Bit
data buffer. In Rack Column below, that showing another information. That are I Address, this default analog Input
address.
AI Module window properties show description for Analog Input module. In general tab, show the information for AI
type.
Figure 7 General Description
Click Address Tab. In this tab, show information for Input Address. The address is default but we can change the
address, un-check the System default Box and change the address as needed.
Figure 8 Address
Click Input Tab. In this tab we can set the type for input, input can be Current or Voltage. And the range to be
measured. In this project we choose the Voltage Input with range +/- 10V. Click OK for save all changes.
Step add AO module same with add AI module, expand SM-300 folder then open AO-300, select and drag SM
332 AO2x12Bit into Rack Column.
Figure 10 Add AO Module
Double click again in AO module, to open AO Module Properties window. In General Tab properties, show general
information for the AO Module.
In address tab, show about address information for output. Same with AI, AO have default Address and we can
change the default address with un-check the System default box.
Output Tab properties, show the configuration for the output, we can choose the output we needed for the project. In
this project we select voltage for output with range +/- 10 V.
Figure 13 Output properties
After finish configure click save and compile for save and apply all changes.
In NetPro window, we can see a station. This station represent the station we create in this project. Click the MPI
port (Highlighted in Figure 16) and drag to MPI network in above. Save and compile for save all changes.
MOVE (Assign a Value) is activated by the Enable EN Input. The value specified at the IN input is copied to the
address specified at the OUT output. ENO has the same logic state as EN. MOVE can copy only BYTE, WORD, or
DWORD data objects. User-defined data types like arrays or structures have to be copied with the system function
"BLKMOVE". Put analog input address in IN, analog output in OUT. For assigning Input and output in program use
forma PIB (in Byte), PIW (in Word). And PQB (in Byte), PQW (in Word).
Figure 20 Addressing
Try to simulate program use Simatic S7-PCSim, run Simatic S7-PLCSim with click Simatic S7-PLCSim icon.
Put analog input address and analog output address in input and output variable on S7-PLCSim. For PIB use
Slider, so we can change data linearly. For output we cant measure the real output from AO, in S7-PLCSim the
output from AO is in DATA. We can select data form in Binary, Word, Dword, Hexadecimal.
Run S7-PCSim,
Figure 24 Run PLCSim
Move the slider in PIB 256, and see the change in PQB 272. In PLCSim we can measure voltage output from AO
Module, the output is in data (Binary, Word, DWord, INT, Decimal, etc.).
Change address in Out become MB 1, this mean memory with address 1 with binary type data. Save and close
program Block.
Download again program into PLC, in PLCSim change Output Variable PQB 272 become MB 1.
drive.web
over Ethernet
Internet accessible
distributed control for
drives, systems & PLCs
driveweb.com
Labels:
PLC Simulator
must be read :
PLC and NFC Mitsubishi PLC FX RFID Application for ACR122U USB Near Mitsubishi PLC FX1S
Application : ACR122U Series Communicat... Mitsubishi PLC... Field Communicatio... and Computer (L...
U...
Share Me on Facebook Share Me on Google+ Tweet Me on Twitter Share Me on Linkedin Pin Me on Pinterest Share Me on Buffer
PLC
Application
PLC
Articles
PLC
Simulation
PLC
Simulator
PLC
Tutorial
Product
News
SCADA
Application
SCADA
Articles
Blog Archive
Select Blog Archive
Ads by Google
1.Download Simulator
search on google
Search
Powered by Blogger.