regarding ASKII serial and S7-200

bleach

Member
Join Date
Jul 2007
Location
Jeddah
Posts
61
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 have taken it from SIEMENS HELP "
TWORK 1 // 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



NETWORK 1 // 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.



NETWORK 1 // Interrupt 1
//10 ms timer interrupt
LD SM0.0
DTCH 10 //Detach timer interrupt

XMT VB100 0 //Transmit message back to user on port 0

what i want now is to communicate (send and receive messages) from my PC to S7-200 and i do have the following:
USB/PPI MULTI MASTER CABLE
MOXA USB TO SERIAL ADAPTOR
hyper terminal

thats all what i have, please help me performing this communication

BEST REGARD
 

Similar Topics

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
70
I know this can be done, but I can't get the router config right. My goal is to physically connect(using an ethernet cable) a device(PLC, RTU...
Replies
9
Views
1,009
Hi, I am connecting an Autonics make stepper driver type, MD5-ND14 to a Kinco PLC (K205 series) this has a sourcing output which cannot be...
Replies
2
Views
1,109
Replies
5
Views
1,913
I haven't had to tune a PID loop in a very long time. It's actually a PI loop for a pulse width modulation s.v. What was the name of that tuning...
Replies
16
Views
4,093
Back
Top Bottom