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
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