You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pleas add support of the syntax hihglighting for Structured text languages used in programmable logic controllers (PLC) as defined in IEC 61131-3 (for example CoDeSys or Siemens SCL)
s. Wikipedia Article with references for more detailed information.
They are basically wery similar to PASCAL and it is possible to use this language definition for highlighting.
But as you can see below, some specific constructions remain not parsed:
// PLC configuration
CONFIGURATION DefaultCfg
VAR_GLOBAL
b_Start_Stop : BOOL; // Global variable to represent a boolean.
b_ON_OFF : BOOL; // Global variable to represent a boolean.
Start_Stop AT %IX0.0:BOOL; // Digital input of the PLC (Address 0.0)
ON_OFF AT %QX0.0:BOOL; // Digital output of the PLC (Address 0.0). (Coil)
END_VAR
// Schedule the main program to be executed every 20 ms
TASK Tick(INTERVAL := t#20ms);
PROGRAM Main WITH Tick : Monitor_Start_Stop;
END_CONFIGURATION
PROGRAM Monitor_Start_Stop // Actual Program
VAR_EXTERNAL
Start_Stop : BOOL;
ON_OFF : BOOL;
END_VAR
VAR// Temporary variables for logic handling
ONS_Trig : BOOL;
Rising_ONS : BOOL;
END_VAR
// Start of Logic// Catch the Rising Edge One Shot of the Start_Stop input
ONS_Trig := Start_Stop ANDNOT Rising_ONS;
// Main Logic for Run_Contact -- Toggle ON / Toggle OFF ---
ON_OFF := (ONS_Trig ANDNOT ON_OFF) OR (ON_OFF ANDNOT ONS_Trig);
// Rising One Shot logic
Rising_ONS := Start_Stop;
END_PROGRAM
The text was updated successfully, but these errors were encountered:
If you'd be interested in working on this yourself and contributing a 3rd party grammar we'd be happy to have it! Looks like it might be a pretty simple grammar as far as such things go.
Pleas add support of the syntax hihglighting for Structured text languages used in programmable logic controllers (PLC) as defined in IEC 61131-3 (for example CoDeSys or Siemens SCL)
s. Wikipedia Article with references for more detailed information.
They are basically wery similar to PASCAL and it is possible to use this language definition for highlighting.
But as you can see below, some specific constructions remain not parsed:
The text was updated successfully, but these errors were encountered: