JDCROCKETT724
Member
Greetings,
I am trying to write a FB where I can simply dictate a start address of an input as an IN parameter and a start address of an output as an OUT parameter. Then, inside the FB, copy the necessary block of input data starting at the input address to my static variables for use as the FB code. Finally write the data to the outputs starting at the output address.
If I were to use my AB know how with S7 terminology I would have code that looks like this:
IN: start_input_address INT
OUT: start_output_address INT
copy: Source- I[start_input_address]
Dest- DIB0
Length- 16
-----------FB code here------------
copy: Source- DIB16
Dest- DIB0Q[start_output_address]
Length- 16
Certainly, this is not how S7 works, but how would you pros approach this problem. I would like to assume this is a common FB task in S7.
My background is as an AB programmer and I have been handed a Step 7 V5.5 Project to write. I am trying to grasp how to do some things in S7 that seem a lot easier in AB. I know I have to try and separate the two, but this can be real frustrating . I have spent all morning reading and searching how to do this.
I am trying to write a FB where I can simply dictate a start address of an input as an IN parameter and a start address of an output as an OUT parameter. Then, inside the FB, copy the necessary block of input data starting at the input address to my static variables for use as the FB code. Finally write the data to the outputs starting at the output address.
If I were to use my AB know how with S7 terminology I would have code that looks like this:
IN: start_input_address INT
OUT: start_output_address INT
copy: Source- I[start_input_address]
Dest- DIB0
Length- 16
-----------FB code here------------
copy: Source- DIB16
Dest- DIB0Q[start_output_address]
Length- 16
Certainly, this is not how S7 works, but how would you pros approach this problem. I would like to assume this is a common FB task in S7.
My background is as an AB programmer and I have been handed a Step 7 V5.5 Project to write. I am trying to grasp how to do some things in S7 that seem a lot easier in AB. I know I have to try and separate the two, but this can be real frustrating . I have spent all morning reading and searching how to do this.