HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

Program regarding modules in a segment of SIS

2015-08-19View Original

Thread Content

Let’s see which programming expert can help translate the following program – it’s so difficult. This module has four pins: INPUT: IN, PT; OUTPUT: Q, ET. FUNCTION_BLOCK TM (*External Interface*) VAR_INPUT IN : BOOL ; (*Input*) PT : TIME ; (*Pulse Time*) END_VAR VAR_OUTPUT Q : BOOL ; (*Output Pulse*) ET : TIME ; (*Elapsed Time*) END_VAR VAR M : BOOL ; (*State*) T0 : DT ; (*Start Time*) END_VAR IF NOT Q THEN IF IN AND NOT M THEN Q := TRUE ; T0 := GetTimer() ; END_IF ; IF NOT IN THEN ET := T#0ms ; END_IF ; ELSE ET := GetTimer() - T0 ; IF ET >= PT THEN ET := PT ; Q := FALSE ; END_IF ; IF ET < PT THEN Q := M; END_IF; END_IF ; M := IN ; END_FUNCTION_BLOCK
Reply #22015-08-19
This should be a program written in TRICON’s ST structured text. It’s actually just a pulse trigger; IN is the input for detecting pulses, while PT is used to set the pulse duration. Q is the pulse output, while ET indicates how long the pulse has been triggered.
Reply #32015-08-19
There’s no point in using ST to write programs; it’s much better to use FBD and LAD for that.
Reply #42015-08-20
Yes, it doesn’t make much sense to use ST for it, but it is still widely used in current systems
Reply #52015-08-20
Thank you. It’s really difficult; I truly can’t understand it. I’m used to programming with function blocks before, so thanks
Reply #62015-08-22
ST is flexible and allows for whatever kind of control is desired; it can be used for functions that are difficult to achieve with conventional logic, serving as an advanced approach to control.

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.