desperately need simple sample programs or exercises for Step7 Professional

Simple task. Write an FB that will flash an output using a user settable period using IEC timer(s). Use STL for the FB.

task1.JPG
 
Last edited:
Expand and allow the user to set the frequency or the period.
If the period is zero, use the frequency, if the frequency is zero use the period. For all other conditions the output should stay at zero.

task3.JPG
 
Last edited:
Expand and allow the user to specify the byte.bit of the Q that is to flash. Example shown will flash Q4.3

task4.JPG
 
Expand and combine the individual FB parameters into a UDT, create a DB containing the UDT and pass the UDT as an input parameter to the FB.

task5.JPG
 
Write an FC that determines the following data for an array:
1.DBNumber where array is located
2.Area pointer of start address of the array
3.The size of the array in bytes
4.The size of an array element in bytes
5.The size of the array in elements

The FC will have two any pointer input parameters, the first points to the array, the second points to an element of the array. The FC will use an any pointer return value to point to a udt containing the determined data for the array as detailed above.

Example call and UDT shown below:

task7.JPG
 
Last edited:
these types of examples need profissional programer like you .
what about teach us how to deal with pionter format or any pointer format
in STL and complex data type like array and structure and pointer data type , you will be generous if you make a video supported with sound to explain these details , i believe that pointers are complex enough to understand ,but if you know basics ,you could know more details with examples

thank you in advance
 
Expand so that two separate flashers can be passed to the FB using UDTs

Hi LD,

I've just been working through your examples myself.

I've got to the part about making the FB accept 2 UDTs.

Passing the new UDT is no problem but the only way I can see of doing the code is by 'doubling' it up. i.e. adding 2 new SFB 4 TONs etc...

I'm sure this can't be correct and I'm also sure that I'm missing something simple. I've attached the library of the project I have so far but just wanted a 'prod' in the right direction if possible.

Cheers

;-)
 
Create two instance of the FB from the previous example and then pass on the two UDT's to each instance.
 

Similar Topics

hi,i'm an undergrad student frm india exposed to a KOYO plc for the first time.i basically joined the forum for some tips to program the...
Replies
2
Views
3,340
Hello let me explain my problem. I just got tossed into a somewhat complicated job because the person that normally does the writing is on...
Replies
5
Views
3,829
Hi. I tried to find help in for documenting or migrating Pilz Pitouch HMI projects (in 2007) in this thread...
Replies
1
Views
1,500
Hi all. I am trying to find safety application examples for an inspection door with electromechanical interlock. I can find many door switches...
Replies
39
Views
13,689
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
338
Back
Top Bottom