PDA

View Full Version : Macrocyle&Execution time


jalin
November 28th, 2006, 07:13 PM
Hi gurus

I am an instruments engineer. Now I have a project to design. Honeywell DCS maybe configured in our Foundation Fieldbus system. I read many letters on this forum. Many people discuss on how many VCR be considered in each segment. But my question is how many devices can be settled in each segment. My concern is how do I calculate the execution time of FB(function block) in each segment.
1:
If I have two flow-meter (AI, 50ms), level-meter (AI, 40ms) for control valve(AO,45ms ,PID,100ms) configured one segment and macrocycle time is 1 sec(1000ms), I want to know how many time they take.
2:
The condition is as same as above I mentioned.
If I put PID function block on host (DCS), they will take the same time or not.
3:
Is Macrocycle time divided two phases? That is SECHDUAL and UNSECHDULE. If the assumption is right, execution of FB can be put one of them. How do I know it can work?
4:
One device use a VCR(pub/sub) that takes transmitter time, 48ms~10ms. Is it right? AI FB can work simultaneously. Each device use VCR to transmit to DCS. Can they work simultaneously?

I look forwad to your reply.
THINK YOU .

Heather Santos
November 30th, 2006, 12:36 PM
Hello Jalin,

Hopefully this will get you going in the right direction:

1:
You have a total of 235ms of block execution time described, a macrocycle of 1 second should be plenty, and is a common macrocycle used.

2:
Putting the PID in the host will add to the transmission time needed on the segment. With the AO and PID in the same device, you will have 1 scheduled transmission. With the PID in the host, you will have 3 scheduled transmissions, at ~48ms each eating away at the 1 sec macrocycle.

3:
The macrocycle itself is a phase, think of it like a pattern that repeats. Within the pattern there are specific times that a transmission occurs, these are the scheduled communications using VCR's. These communications are seen over the network. The time required by each block to execute its algorithm is not seen on the network. Two device resources (i.e. a flow transmitter and a level transmitter) can execute a function block at the same time, however, only one device can communicate on the segment at one time. The function blocks should be scheduled to execute in the logical control order, AI - PID - AO for example. Time between block executions is used for the scheduled transmissions over the network, if the blocks are in two different resources. The remaining time in the 1 second macrocycle is used to rotate the token through the live list of devices (including a host). The devices use the token to send alarms, trends, views, etc. The operator can perform reads/writes also. The idea is to balance the scheduled portion of the macrocycle with enough unscheduled time to allow smooth operation of the segment.

4:
I'm not sure about the transmission time ~48ms, as this might be host dependant. To reiterate from above; Each device using VCR cannot transmit simultaneously. Each device can execute blocks simultaneously.
You could schedule each device to transmit one after another, with the function block already executed. It depends on the control scheme you're trying to accomplish.

jalin
December 1st, 2006, 10:34 PM
Hi Santos.

I am glad to receive your response. I have some question to discuss with you. My project need me to study how many of instruments were configured in each segment. Different type of instrument also be considered.

1:
You said that I just need 235ms to execute in this segment. Could you explain to it clearly? I think it is different time consumption if two AI FB is executed simultaneously.
*1: ( scheduled transmission time=25ms,PID executed in device)
flow meter=50+25(connect to host)=75ms
level meter=
50(synchronic with flow meter)+25(connect to host and control valve)
=25ms
control valve=100+45+25(*)=170ms
total=270ms+(LAS execute at unscheduled time)<1000ms
*2: scheduled transmission time=25ms,PID executed in host)
flow and level meter as the same as above *1.
control valve=
25(AI to host PID)+100+25(host PID to AO)+45+25(AO to host PID)
=220ms
total=320ms+(LAC execute at unscheduled time)<1000ms
2:
As you mentioned it, you meant that 1 scheduled transmission used with the AO and PID in the same device. 3 scheduled transmission used in opposite configuration. Is right my assumption at 1?

3:
When level-meter translated it to host and PID, it needs 1 transmission scheduled time and level-meter(VCR/pub),host(VCR/sub) and control valve(VCR/sub). Is it right?
With PID and AO in the same device. Is signal from PID to AO used VCR ? Does it need execute time to deal with?

Thx for you taking time to read my question.
I hope that i can learn it more from you.
jalin

jalin
December 4th, 2006, 11:02 AM
hi !
I surfed honeywell website and i found a paper is good for this subject.
If you are a member of honeywell site. you can look for this paper,

"optimizing fieldbus link schedules makes a difference!",.


It maybe can give you some concept about link schedule time.

To whom may be concerned.

jalin

Vasudev
December 12th, 2006, 05:42 AM
Since most of your queries have been satisfied by Heather Santos, I would just like to add more on point #2
There are three options for PID impliementation
1. put PID in fieldbus positioner ( AO+PID)
2. put PID in Fieldbus transmitter (AI+PID)
3. put PID in DCS
In case of one, you will have one scheduled communication i.e AI to PID/AO
In case of second, you will have two sheduled communication AI/PID to AO and AO to PID(BKCAL_OUT)
In case of third, you will have two sheduled communication ( AI to DCS and AO to DCS)
First option is preferable as you will have one schedueld communication. But if you compare FB excecution time for PID in positioner and in transmitter, ;you will find that total time of FB execution for AI and PID in Transmitter is less compare to total execution time of FB (PID and AO) in positioner.
Secondly, when you implement PID in DCS, you can take advantage of rich PID algorithms available in DCS compare to field device implemented PID. I mean to say that DCS PID is more versatile than PID FB implemented in device.
However if you look into the execution part where DCS PID is involved, you should have two time schedules to sync. 1. macrocylce and 2. DCS controller scan/execution time. This is more complex if you have stringent requirement of loop execution time say 200 mS etc.