regarding S7-200

bleach

Member
Join Date
Jul 2007
Location
Jeddah
Posts
61
hello every body can please check this program out, i have taken it from the help pages in Micro Win>

// Main Program
LD SM0.1 //On the first scan,
MOVB 16#09, SMB30 //Initialize Freeport:
// - Select 9600 baud
// - Select 8 data bits
// - Select no parity
MOVB 16#B0, SMB87 //Initialize RCV message control byte:
// - RCV enabled
// - Detect end of message character
// - Detect idle line condition as
// as message start condition
MOVB 16#0A, SMB89 //Set end of message character to hex OA (line feed)

MOVW +5, SMW90 //Set idle line timeout to 5 ms.
MOVB 100, SMB94 //Set maximum number of characters to 100.
ATCH INT_0, 23 //Attach interrupt 0 to the receive complete event.
ATCH INT_2, 9 //Attach interrupt 2 to the transmit complete event.
ENI //Enable user interrupts
RCV VB100, 0 //Enable receive box with buffer at VB100 for port 0

in atch INT_2 it show error, i don't know why...........
also the same thing in:

// Interrupt 0
//Receive complete interrupt routine

LDB= SMB86, 16#20 //If receive status shows receive of end character,
MOVB 10, SMB34 //then attach a 10 ms timer
ATCH INT_1, 10 //to trigger a transmit
CRETI //and return.
NOT
RCV VB100, 0 //If the receive completed for any other
//reason, then start a new receive.

can u please tell me what is the problem in this 2 INT_2, and 1

BEST REGARD
 
Hi

You need to add INT_1 and INT_2 as subroutines in the Program Block (LH Pane in MW)

If you started with a blank new sheet and pasted this code in you will get errors as INT_1 and 2 is undefined.

Microwin Puts in as standard Main, Sub_0 and Int_0 as standard

Right click on Int_0 and click Insert > Interupt (You need to do this twice to get 1 and 2)

Then it will compile correctly

INT_1.jpg
 
Last edited:

Similar Topics

I have a micrologix 1200 with me, it communicates with pc with the help of Rs-232 Cable. My computer have Usb so i connect the usb to serial cable...
Replies
2
Views
1,471
Dear All, I want to Reset the password of Micrologix 1200 by uploading the program from plc so is it possible and if possible then how...
Replies
2
Views
3,970
I am trying to Configure Siemens S7200 (cpu222) with Vijeo citect scada on PPI cable but the problem i face in vijeo citect is that i am not able...
Replies
0
Views
4,305
hello every body, i want to send and receive a character of 8 bit from my PC to S7-200 am using this program: "I...
Replies
0
Views
2,024
Hi everyone, I need a solution based on the cause and effect diagram, especially a macro sheet or VBA script in Excel, which will help me generate...
Replies
0
Views
64
Back
Top Bottom