| Entrambe le parti precedenti la revisione Revisione precedente Prossima revisione | Revisione precedente |
| equal [21/05/2019 16:03] – admin | equal [04/02/2020 11:06] (versione attuale) – admin |
|---|
| ====== Funzione equal ====== | |
| |
| I tempi sono in centesimi di secondo (da 0 a 65534 con 65535=infinito). E' possibile cambiare l'unità di misura con la funzione **plc_time_unit** con le seguenti modalità: | ====== PLC funzione: equal ====== |
| | |
| | L'uscita ha lo stesso stato di tutti i suoi ingressi se sono uguali, resta inalterata se sono diversi, si può impostare un ritardo di inseguimento programmabile separatamente per le transizioni dell'uscita 0→1 (plc_delay_off_on) e 1→0 (plc_delay_on_off) oltre che ad un tempo massimo ON (plc_tmax_on). |
| | |
| | I tempi sono sono multipli dell'unità di misura "plc_time_unit" secondo la seguente tabella: |
| |
| * "0.01" centesimi di secondo | * "0.01" centesimi di secondo |
| * "0.1" decimi di secondo | * "0.1" decimi di secondo |
| * "1": secondi | * "1": secondi (default) |
| * "2.5": 2.5 secondi | * "2.5": 2.5 secondi |
| Se **plc_time_unit** non è impostata, l'unità di misura è espressa in centesimi di secondo | Se "plc_time_unit" non è impostata, l'unità di misura è espressa in secondi. |
| |
| Esempio di uscita OUT2 comandata dall'ingresso della BOARD:4, IO_LOGICO:11 con ritardo di accensione di 200 centesimi di secondo e ritardo di spegnimento di 500 centesimi | Esempio di uscita OUT2 comandata dall'ingresso della stessa BOARD e LOGIC_IO:4 con ritardo di accensione di 1 secondo e ritardo di spegnimento di 2 secondi con tempo massimo ON di 5 secondi. |
| |
| <code json> | <code json> |
| | "IO4": { |
| | "enable": 1, // I/O enable |
| | "logic_io": 4, // Logic reference (ID) of each I/O |
| | "device_type": "DIGITAL_IN_PULLUP", |
| | "default_startup_filter_value": 0, // Preset filter state |
| | "time_refresh": 600, // Refresh data into BUS |
| | "filter": 20, |
| | "inverted": 0, |
| | "name": "pulsante2", |
| | "description": "pulsante2" |
| | }, |
| "OUT2": { | "OUT2": { |
| "io_logic": 1, | "enable": 1, // I/O enable |
| "direction": "output", | "logic_io": 5, // Logic reference (ID) of each I/O |
| "io_type": "digital", | "device_type": "DIGITAL_OUT", |
| "default_startup_value": 1, | "default_startup_value": 0, // if omitted: default = 0 |
| "inverted": 1, | "time_refresh": 300, // Time in sec/10, if omitted: default = 3000 (300 seconds) |
| "filter": 127, | "filter": 20, // if omitted: default = 20 |
| "time_refresh": 30, | "plc_preset_input": 0, // Preset data byte input until communication arrive, if omitted: default = 0 |
| "n_refresh_on": 1, | "plc_function": "equal", // PLC function |
| "n_refresh_off": 1, | "plc_linked_board_id_logic_io": [ // PLC inputs |
| "enable": 1, | "*-4" |
| "plc_function": "equal", | |
| "plc_linked_board_id_io_logic": [ | |
| "4-11" | |
| ], | ], |
| "plc_delay_on_off": 500, | "plc_time_unit": 1, // Time unit (1: 1 second - 0.1 - 0.01 - 2.5) |
| "plc_delay_off_on": 200, | "plc_tmax_on": 5, // Max time output ON, if omitted: default = 65635 (infinite) |
| "name": "OUT2", | "plc_delay_on_off": 2, // Delay ON->OFF, if omitted: default = 0 |
| "description": "RELE2", | "plc_delay_off_on": 1, // Delay OFF->ON, if omitted: default = 0 |
| "dtype": "Switch" | "name": "OUT RELE", |
| | "description": "OUT RELE" |
| | } |
| | </code> |
| | |
| | Esempio di uscita OUT2 comandata dai 2 ingressi IO3 e IO4 della stessa BOARD con ritardo di accensione di 1 secondo e ritardo di spegnimento di 2 secondi con tempo massimo ON di 5 secondi. |
| | |
| | <code json> |
| | "IO3": { |
| | "enable": 1, // I/O enable |
| | "logic_io": 3, // Logic reference (ID) of each I/O |
| | "device_type": "DIGITAL_IN_PULLUP", |
| | "default_startup_filter_value": 0, // Preset filter state |
| | "time_refresh": 600, // Refresh data into BUS |
| | "filter": 20, |
| | "inverted": 0, |
| | "name": "pulsante1", |
| | "description": "pulsante1" |
| }, | }, |
| "IO1": { | "IO4": { |
| "io_logic": 11, | "enable": 1, // I/O enable |
| "direction": "input", | "logic_io": 4, // Logic reference (ID) of each I/O |
| "io_type": "digital", | "device_type": "DIGITAL_IN_PULLUP", |
| "pullup": 1, | "default_startup_filter_value": 0, // Preset filter state |
| "filter": 10, | "time_refresh": 600, // Refresh data into BUS |
| "time_refresh": 3000, | "filter": 20, |
| "n_refresh_on": 1, | "inverted": 0, |
| "n_refresh_off": 1, | "name": "pulsante2", |
| "enable": 1, | "description": "pulsante2" |
| "name": "IO1", | |
| "description": "Ingresso IO1", | |
| "dtype": "Switch" | |
| }, | }, |
| | "OUT2": { |
| | "enable": 1, // I/O enable |
| | "logic_io": 5, // Logic reference (ID) of each I/O |
| | "device_type": "DIGITAL_OUT", |
| | "default_startup_value": 0, // if omitted: default = 0 |
| | "time_refresh": 300, // Time in sec/10, if omitted: default = 3000 (300 seconds) |
| | "filter": 20, // if omitted: default = 20 |
| | "plc_preset_input": 0, // Preset data byte input until communication arrive, if omitted: default = 0 |
| | "plc_function": "equal", // PLC function |
| | "plc_linked_board_id_logic_io": [ // PLC inputs |
| | "*-3, *-4" |
| | ], |
| | "plc_time_unit": 1, // Time unit (1: 1 second - 0.1 - 0.01 - 2.5) |
| | "plc_tmax_on": 5, // Max time output ON, if omitted: default = 65635 (infinite) |
| | "plc_delay_on_off": 2, // Delay ON->OFF, if omitted: default = 0 |
| | "plc_delay_off_on": 1, // Delay OFF->ON, if omitted: default = 0 |
| | "name": "OUT RELE", |
| | "description": "OUT RELE" |
| | } |
| </code> | </code> |
| | |
| | ---- |
| | |
| | {{counter}} person(s) visited this page until now. |
| | |
| | ~~DISCUSSION~~ |
| |