S7-200 RCV in Interupt

Clay B.

Lifetime Supporting Member
Join Date
Jun 2005
Location
Concord,NC
Posts
1,304
Ok this is an ongoing project. I am using an S7-200 with a 226 CPU. I am talking serially to a weight controller. When I request data from the Weight Controller I send it a ASCII P value. Weight Controller sends me data back. My RCV is in and Interupt and is triggered by event 9 (transfer complete). All of this works fine.

Now my problem. I somtimes have to change the weight units. I do this by sending an ASCII U to my weight controller. Problem is I do not get anything back so I get stuck in Interrupt. Question I have is how do I stop the Interrupt once it has started. I am probably missing something obvious but have spent the entire day just getting the Comm's this far.
 
Disable/Detach the Interrupt associated with the RCV instruction, send the configuration data with a separate XMIT then, re-enable/Attach the Interrupt.

Bryan
 
Disable/Detach the Interrupt associated with the RCV instruction, send the configuration data with a separate XMIT then, re-enable/Attach the Interrupt.

Will try this. With Ab using more than one read and write generally leads to trouble. But I can make this work.

thanks Bryan

BTW... I got the serial comms working great. I did find that using an Interupt for the recieve helped. Whne I put my RCV in a subroutine my data would get trunticated. My thought is that the reponce times from the weight controller changes some while it is running. I haven't really dug into it yet though. Once I got it running I moved on. The main gothcha with the Siemens tip that I found was the message timer. In the example SMW92 is used an idle timer and if you set SM87.2 to 1 then it looks at this timer and terminates the RCV. This is good when you have everything hooked up and you want to trip an alram if the data is not there on time but when you are simulating it does pose a problem.
 
Glad you got it going, again sorry I didn't have time to run through the list of questions. Still, as you have sorted it I guess I can relax this weekend :nodi:.

Bryan
 
Yes, getting it going definatly had its hurdles. I did as you suggested on the XMT instruction. I have one that sends the 'P' so I get data back. Onit I brach in an ENI to enable the read interupt. On the next rung I do another XMT that sends a 'U' instruction that changes the displayed unit base. Everything works so I am on to the next phase. Getting my weight values out of the string coming back.

Thnaks again for all of your help.
 

Similar Topics

Hi. I have a 222 CPU. I need to recover the program from the eeprom memory. Is it possible?
Replies
1
Views
82
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
252
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
81
Hi folk, I would like to know what kind of Parameters should I setup for controlling with Profibus. My old Lenze 8200 motec 0.25kW have a busted...
Replies
0
Views
79
Hi, I have attached herewith one image which our programmer has been used in S7 1500 PLC. Now we need to use the same instructions in S7 1200 PLC...
Replies
4
Views
118
Back
Top Bottom