how best to create these pulse signals for a sim program s7-1200

Not as simple as @LD's, but here is my approach, described earlier.

Caveats


  • The times are increased by an order of magnitude (2.75s cyclic time, instead of 275ms) so I could watch the bits.
  • There is no randomness added to the green data; that is left as an exercise for the user.
  • My ST/SCL skills are limited; it could be written better.
  • Main (OB1; not shown) has one rung, which calls FB_set_bits_instance
xxx.png

yyy.png
 
Refactored version: cleaner with half the statements.


Also reduced the times to the actual targets, because the trace provides adequate feedback to demonstrate sub-millisecond resolution, as measured by the S7-1214C clcck. The cyclic interrupt blocks are possibly noticeable in the larger delay between the samples before and of the A rising edge.


xxx.png

yyy.png
 

Similar Topics

Hi folks, I've been given some help already with PlantPAx which has been much appreciated, I'm looking for a bit more now though please!:)...
Replies
0
Views
2,133
Compactlogix controller, program has 28 conveyors that use TON's to start the conveyors. The TT sounds a warning horn during start and the DN...
Replies
10
Views
479
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
585
I am going to need to use HART multi-drop in order to handle a series of Vega Radar units. There are a lot of options and I'm wondering what...
Replies
3
Views
245
Out of interest, I'd like some thoughts on what would be considered best practice with regards to a 2-position turntable control scheme (see...
Replies
17
Views
1,115
Back
Top Bottom