Reading and Writing to pxx addresses in a FB

CliveBaker

Member
Join Date
Sep 2005
Location
Midlands
Posts
83
Hi all,

I want to create a FB to read and write to addresses from hardware configuration the start address will be an input to the FB. I want to be able to read 4 bytes an 4 integers and sent them to a DB, also an input To the FB.
I need to write the FB because SFC14/15 will not read Rotork valves on Profibus.

any help would be appreciated.
 
SFC14/14 do nor work with Rotork valves error 08b1. Siemens say it is the GSD file. I have been controlling these valves for years but this is the first time the have been on a CPU profibus network (XI, X2). T e code is written off site so cannot be tested fully until commissioning.

I found the problem out today. So I had read and write each valve using absolute addresses ie. PIB320. I thought I could write a FB so I could pass the start DB to it, but I cannot find a way to make the PI/Q address variable.
 
..here is an example using an FC to perform the PIx accesses and store them in a DB

Thank you for this, it is just what I needed.

I think I can modify it to write to PQ addresses but STL is not what I am used to with S7. But I will give it a try.
 
SFC14/14 do nor work with Rotork valves error 08b1.
There is no "08B1" error for SFC14 or SFC15. I think you mean 80B1hex.
The length of the specified destination area is not identical to the user data length configured with STEP 7.
I am betting that there was a trivial error in the programming of SFC14.
 
Hi Jesper This has happened in 2 separate programs written by different people. Each had the same issue when I was asked to commission them. The site I am on now has 28 of these valves that give me the error I have spoken to Siemens about this and we cannot see why it does not work. Siemens are blaming Rotork. I have not had chance to contact them myself due to I need to make them work now.

Thanks any way for you help.
 
Hi Jesper,

I have attached 3 pictures of the HWC and SFC15 and SFC15.
The code is for the same Rotork Valve. The address is 540 for both PI and PW. At the moment I am not on site so I cannot show you live data.

HWC.jpg SFC14.jpg SFC15.jpg
 
You have 6 bytes being sent to the drive, and 12 bytes being read from the drive.
Only data with 1, 2 or 4 byte length can be read or written consistently with a simple load or transfer instruction.
3 bytes or 5 bytes or higher must be read or written consistently with SFC14 and SFC15.
 
You need to post details of the structure of .SEND_PB

Copy the DB (+ any related UDT's if used)to a library, archive the library and post as an attachment.
 

Similar Topics

Summary: How to remotely toggle BOOL values on a vendor-supplied system having a L24ER PLC? (RSLogix Studio 5000 version 33.01.00) I have a...
Replies
5
Views
1,698
Hello Friends My experience with Siemens is limited. From HMI I would like introduce Minutes and Seconds to a timer. Also, in HMI I would like...
Replies
5
Views
3,923
I am reading and writing to I/O tags in Logix5571 using python. While dissecting using Wireshark, I could see that the Symbol Class(0x6b) is being...
Replies
0
Views
1,329
Hi again guys, This forum has been great for all the questions ive asked these last few days. Another one now.. haha I am currently working...
Replies
3
Views
4,194
Hey guys, i'm controlling altivar 71 drive from modicon m340 cpu 2020 plc through modbus communication, when I read and write at the same time...
Replies
5
Views
2,191
Back
Top Bottom