Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
| Entrambe le parti precedenti la revisione Revisione precedente Prossima revisione | Revisione precedente | ||
| plc [10/12/2019 15:00] – admin | plc [03/11/2020 09:03] (versione attuale) – dani | ||
|---|---|---|---|
| Linea 1: | Linea 1: | ||
| - | ====== PLC functions available on DL485 boards | + | ==== PLC functions available on DL485 boards ==== |
| - | ====== Funzioni PLC disponibili su schede DL485 ====== | + | ==== Funzioni PLC disponibili su schede DL485 ==== |
| // | // | ||
| Linea 10: | Linea 10: | ||
| Tramite il PLC è possibile così rendere autonomo il funzionamento delle schede senza necessariamente doverle comandare da sistemi di supervisione domotici quali Domoticz, Home Assistence....... che potranno servire per monitorare i vari I/O ed eventualmente comandarli manualmente, | Tramite il PLC è possibile così rendere autonomo il funzionamento delle schede senza necessariamente doverle comandare da sistemi di supervisione domotici quali Domoticz, Home Assistence....... che potranno servire per monitorare i vari I/O ed eventualmente comandarli manualmente, | ||
| - | ===== Funzioni PLC (opzionali) - PLC Functions (optional) ===== | + | ==== PLC Functions (optional) ==== |
| + | ==== Funzioni PLC (opzionali) | ||
| **disable** | **disable** | ||
| - | //No associated function. The OUTPUT is not used by plc.// | + | //No associated function. The PLC does not command the associated output.// |
| - | Nessuna funzione associata. | + | Nessuna funzione associata. |
| **[[equal]]** | **[[equal]]** | ||
| Linea 22: | Linea 23: | ||
| //The output has the same status of all its inputs if they are equal, remains unchanged if they are different, you can set a separately delay for the output transitions 0-> 1 and 1-> 0// | //The output has the same status of all its inputs if they are equal, remains unchanged if they are different, you can set a separately delay for the output transitions 0-> 1 and 1-> 0// | ||
| - | L' | + | L' |
| **[[nequal]]** | **[[nequal]]** | ||
| Linea 32: | Linea 33: | ||
| **[[and]]** | **[[and]]** | ||
| - | //" | + | //Function |
| - | Funzione " | + | Funzione " |
| **[[nand]]** | **[[nand]]** | ||
| - | //The output is inverted with respect to the "and" function// | + | //Function |
| L' | L' | ||
| Linea 44: | Linea 45: | ||
| **[[or]]** | **[[or]]** | ||
| - | //" | + | //Function |
| - | Funzione " | + | Funzione " |
| **[[nor]]** | **[[nor]]** | ||
| - | //" | + | //Function |
| - | L' | + | L' |
| **[[xor]]** | **[[xor]]** | ||
| - | //" | + | //Function |
| - | Funzione " | + | Funzione " |
| **[[nxor]]** | **[[nxor]]** | ||
| - | //" | + | //Function |
| - | L' | + | Funzione " |
| **[[odd]]** | **[[odd]]** | ||
| - | //" | + | //" |
| - | Funzione dispari. Uscita a 1 se il numero | + | Funzione dispari. Uscita a 1 se il numero |
| **[[even]]** | **[[even]]** | ||
| - | //" | + | //" |
| - | Funzione " | + | Funzione " |
| **[[toggle_on]]** | **[[toggle_on]]** | ||
| Linea 82: | Linea 83: | ||
| //Reverses the state of the output at each OFF->ON transition of an input// | //Reverses the state of the output at each OFF->ON transition of an input// | ||
| - | Inverte lo stato dell' | + | Inverte lo stato dell' |
| **[[toggle_off]]** | **[[toggle_off]]** | ||
| Linea 88: | Linea 89: | ||
| //Reverses the state of the output at each ON->OFF transition of an input// | //Reverses the state of the output at each ON->OFF transition of an input// | ||
| - | Inverte lo stato dell' | + | Inverte lo stato dell' |
| **[[toggle_on_off]]** | **[[toggle_on_off]]** | ||
| Linea 94: | Linea 95: | ||
| //Reverses the state of the output at each OFF->ON and OFF->ON transition of an input// | //Reverses the state of the output at each OFF->ON and OFF->ON transition of an input// | ||
| - | Inverte lo stato dell' | + | Inverte lo stato dell' |
| **[[timer]]** | **[[timer]]** | ||
| - | //Timing function | + | //Function for timing |
| Funzione per la temporizzazione secondo diverse modalità | Funzione per la temporizzazione secondo diverse modalità | ||
| Linea 104: | Linea 105: | ||
| **[[ntimer]]** | **[[ntimer]]** | ||
| - | //The output is inverted | + | //The output is inverted |
| L' | L' | ||
| Linea 110: | Linea 111: | ||
| **[[autostart_timer]]** | **[[autostart_timer]]** | ||
| - | //As a " | + | //Like the " |
| - | Come " | + | Come la funzione |
| **[[nautostart_timer]]** | **[[nautostart_timer]]** | ||
| - | //The output is inverted | + | //The output is inverted |
| L' | L' | ||
| Linea 122: | Linea 123: | ||
| **[[test_nio_gt_eq_n|test_nio_> | **[[test_nio_gt_eq_n|test_nio_> | ||
| - | //Output 1 if number of inputs at 1 >= n// | + | // |
| - | + | //Output at 0 if number of inputs at 1 is < n// | |
| - | Uscita | + | |
| + | Uscita a 1 se numero di ingressi a 1 è >= n | ||
| + | Uscita a 0 se numero di ingressi a 1 è < n | ||
| **[[ntest_nio_gt_eq_n|ntest_nio_> | **[[ntest_nio_gt_eq_n|ntest_nio_> | ||
| - | //Output 0 if number of inputs at 1 >= n// | + | // |
| + | //Output 1 if number of inputs to 1 is < n// | ||
| - | Uscita 0 se numero di ingressi a 1 >= n | + | Uscita |
| + | Uscita a 1 se numero di ingressi a 1 è < n | ||
| **[[test_nio_into_n]]** | **[[test_nio_into_n]]** | ||
| - | //set output | + | //Output |
| - | setta uscita | + | Uscita |
| **[[ntest_nio_into_n]]** | **[[ntest_nio_into_n]]** | ||
| - | //set output | + | //Output |
| - | setta uscita | + | Uscita |
| **[[test_schmitt_nio]]** | **[[test_schmitt_nio]]** | ||
| Linea 153: | Linea 157: | ||
| **[[ntest_schmitt_nio]]** | **[[ntest_schmitt_nio]]** | ||
| - | //Set the output | + | //Set sent to 0 when the number of inputs to 1 is greater than the set maximum limit and 1 when the number of inputs to 1 is less than the minimum value set, otherwise |
| Setta l' | Setta l' | ||
| + | |||
| + | ==== FUNCTIONS FOR ANALOGUE INPUTS ==== | ||
| + | ==== FUNZIONI per INGRESSI ANALOGICI ==== | ||
| + | |||
| + | //The micro-analog input PINs accept signals between 0 and 1.1V which will be converted into the integer interval between 0 and 1023 (10 bits)// | ||
| + | |||
| + | I PIN d' | ||
| **[[analog_in_equal_n|analog_in_=_n]]** | **[[analog_in_equal_n|analog_in_=_n]]** | ||
| - | //Set the output to 1 when the value of the analog input is equal to the set value, otherwise the output remains 0// | + | //Set the output to 1 when the value of the analog input is equal to the value set, otherwise the output remains |
| Setta l' | Setta l' | ||
| Linea 165: | Linea 176: | ||
| **[[nanalog_in_equal_n|nanalog_in_=_n]]** | **[[nanalog_in_equal_n|nanalog_in_=_n]]** | ||
| - | //Set the output to 0 when the value of the analog input is equal to the value set, otherwise the output | + | //Set the output to 0 when the value of the analog input is equal to the set value, otherwise |
| - | Setta l' | + | Setta l' |
| **[[analog_in_gt_n|analog_in_> | **[[analog_in_gt_n|analog_in_> | ||
| - | //Set the output to 1 when the value of the analog input is > of the set value, otherwise set exit to 0// | + | //Set the output to 1 when the value of the analog input is > of the set value, otherwise set the output |
| - | Setta l' | + | Setta l' |
| **[[nanalog_in_gt_n|analog_in_> | **[[nanalog_in_gt_n|analog_in_> | ||
| - | //Set the output to 0 when the value of the analog input is> of the set value, otherwise | + | //Set the output to 0 when the value of the analog input is > of the set value, otherwise |
| - | Setta l' | + | Setta l' |
| **[[analog_in_gt_equal_n|analog_in_> | **[[analog_in_gt_equal_n|analog_in_> | ||
| - | //Set the output to 1 when the value of the analog | + | //Set the output to 1 when the value of the analogue |
| - | Setta l' | + | Setta l' |
| **[[nanalog_in_gt_equal_n|nanalog_in_> | **[[nanalog_in_gt_equal_n|nanalog_in_> | ||
| - | //Set the output to 0 when the value of the analog input is> = of the set value, otherwise set output to 1// | + | //Set the output to 0 when the value of the analog input is >= to the set value, otherwise set the output to 1// |
| - | Setta l' | + | Setta l' |
| **[[analog_in_schmitt_n|analog_in_schmitt]]** | **[[analog_in_schmitt_n|analog_in_schmitt]]** | ||
| - | //Set the output to 1 when analogin | + | //Set the output to 1 when the value of the analog input is > the maximum value set and 0 when it is <= the minimum value set.// |
| Setta l' | Setta l' | ||
| Linea 201: | Linea 212: | ||
| **[[nanalog_in_schmitt]]** | **[[nanalog_in_schmitt]]** | ||
| - | //Set the output to 0 when analogin | + | //Set the output to 0 when the value of the analogue input is > of the set maximum value and 1 when it is <= to the set minimum value.// |
| Setta l' | Setta l' | ||
| Linea 207: | Linea 218: | ||
| **[[if_analog_in1_eq_analog_in2|if_analog_in1_=_analog_in2]]** | **[[if_analog_in1_eq_analog_in2|if_analog_in1_=_analog_in2]]** | ||
| - | //Set the output to 1 when the values of 2 analog inputs are the same// | + | //Set the output to 1 when the values of the 2 analog inputs are the same// |
| - | Setta l' | + | Setta l' |
| **[[if_analog_in1_gt_analog_in2|if_analog_in1_> | **[[if_analog_in1_gt_analog_in2|if_analog_in1_> | ||
| - | //Set the output to 1 when input 1 is greater than input 2 (range input 0: 1023)// | + | //Set the output to 1 when input 1 is greater than input 2// |
| - | Setta l' | + | Setta l' |
| **[[if_analog_in1_gt_equal_analog_in2|if_analog_in1_> | **[[if_analog_in1_gt_equal_analog_in2|if_analog_in1_> | ||
| - | //Set the output to 1 when input 1 is >= to input 2 (range input 0: 1023)// | + | //Set the output to 1 when input 1 is greater than or equal to input 2// |
| - | Setta l' | + | Setta l' |
| **[[if_analog_in1_-_analog_in2_schmitt_value]]** | **[[if_analog_in1_-_analog_in2_schmitt_value]]** | ||
| - | //Set the output to 1 when the "analogue-1 analogue | + | //Set the output to 1 when the difference |
| - | Setta l' | + | Imposta |
| **[[nif_analog_in1_-_analog_in2_schmitt_value]]** | **[[nif_analog_in1_-_analog_in2_schmitt_value]]** | ||
| - | //Set the output to 0 when the "analogue-1 analogue | + | //Set the output to 0 when the difference |
| - | + | ||
| - | Setta l' | + | |
| + | Imposta l' | ||
| **[[analog_in_plus_n|analog_in_+_n]]** | **[[analog_in_plus_n|analog_in_+_n]]** | ||
| - | //The output replicates the analogue | + | //The output replicates the analog |
| L' | L' | ||
| Linea 244: | Linea 254: | ||
| **[[analog_in_minus_n|analog_in_-_n]]** | **[[analog_in_minus_n|analog_in_-_n]]** | ||
| - | //The output replicates the analog | + | //The output replicates the analogue |
| - | L' | + | L' |
| **[[analog_in_for_n|analog_in_*_n]]** | **[[analog_in_for_n|analog_in_*_n]]** | ||
| - | //The output replicates the analog value of the input multiplied by a value (from 0 to 65535. The overflow | + | //The output replicates the analog value of the input multiplied by a value (from 0 to 65535. The overflow |
| L' | L' | ||
| Linea 258: | Linea 268: | ||
| //The output replicates the analog value of the input divided by a value (from 0 to 65535. The minimum value is limited to 0)// | //The output replicates the analog value of the input divided by a value (from 0 to 65535. The minimum value is limited to 0)// | ||
| - | L' | + | L' |
| **[[analog_in_percent_n|analog_in_%_n]]** | **[[analog_in_percent_n|analog_in_%_n]]** | ||
| Linea 264: | Linea 274: | ||
| //The output returns the module between the value of the analog input and the value of the parameter (from 0 to 65535. The minimum value is limited to 0)// | //The output returns the module between the value of the analog input and the value of the parameter (from 0 to 65535. The minimum value is limited to 0)// | ||
| - | L' | + | L' |
| **[[analog_in_lim_max_n]]** | **[[analog_in_lim_max_n]]** | ||
| - | //The output returns the value of the analog input with maximum limit n (from 0 to 65535)// | + | //The output returns the value of the analog input limited to the value n (from 0 to 65535)// |
| - | L' | + | L' |
| **[[analog_in_lim_min_n]]** | **[[analog_in_lim_min_n]]** | ||
| - | //The output returns the value of the analog input with minimum limit n (from 0 to 65535)// | + | //The output returns the value of the analog input with minimum limit to n (from 0 to 65535)// |
| - | L' | + | L' |
| **[[analog_in1_plus_analog_in2|analog_in1_+_analog_in2]]** | **[[analog_in1_plus_analog_in2|analog_in1_+_analog_in2]]** | ||
| - | //The output returns the sum of the values of 2 analog inputs (limits between 0 and 65535)// | + | //The output returns the sum of the values of the 2 analog inputs (limits between 0 and 65535)// |
| - | L' | + | L' |
| **[[analog_in1_minus_analog_in2|analog_in1_-_analog_in2]]** | **[[analog_in1_minus_analog_in2|analog_in1_-_analog_in2]]** | ||
| - | //The output returns the difference between the values of 2 analog inputs (limits between 0 and 65535)// | + | //The output returns the difference between the values of the 2 analog inputs (limits between 0 and 65535)// |
| - | L' | + | L' |
| **[[analog_in1_mult_analog_in2|analog_in1_*_analog_in2]]** | **[[analog_in1_mult_analog_in2|analog_in1_*_analog_in2]]** | ||
| - | //The output returns the multiplication between the values of 2 analog inputs (limits between 0 and 65535)// | + | //The output returns the multiplication between the values of the 2 analog inputs (limits between 0 and 65535)// |
| - | L' | + | L' |
| **[[analog_in1_div_analog_in2|analog_in1_/ | **[[analog_in1_div_analog_in2|analog_in1_/ | ||
| - | //The output returns the division | + | //The output returns the ratio between the values of the 2 analog inputs (limits between 0 and 65535)// |
| - | L' | + | L' |
| **[[analog_in1_mod_analog_in2|analog_in1_%_analog_in2]]** | **[[analog_in1_mod_analog_in2|analog_in1_%_analog_in2]]** | ||
| - | //The output returns the module | + | //The output returns the rest of the division |
| - | L' | + | L' |
| **[[analog_in1_min_analog_in2]]** | **[[analog_in1_min_analog_in2]]** | ||
| - | //The output returns the minimum value between the values of 2 analog inputs (limits between 0 and 65535)// | + | //The output returns the minimum value between the values of the 2 analog inputs (limits between 0 and 65535)// |
| - | L' | + | L' |
| **[[analog_in1_max_analog_in2]]** | **[[analog_in1_max_analog_in2]]** | ||
| - | //The output returns the maximum value between the values of 2 analog inputs (limits between 0 and 65535)// | + | //The output returns the maximum value between the values of the 2 analog inputs (limits between 0 and 65535)// |
| - | L' | + | L' |
| + | |||
| + | ==== MISCELLANEOUS FUNCTIONS ==== | ||
| + | ==== FUNZIONI VARIE ==== | ||
| **[[or_transition_on]]** | **[[or_transition_on]]** | ||
| - | //OR between fronts of the input signals. If more than one front ON is simultaneously, it is considered a single front. The output remains at 1 for a single machine cycle// | + | //OR between fronts of the input signals. If more than one ON edge arrives in the same macchima cycle, it is considered |
| - | OR tra fronti ON dei segnali in ingresso. Se più di un fronte ON contemporaneamente (nello stesso ciclo macchima), si considera un solo fronte. L' | + | OR tra fronti ON dei segnali in ingresso. Se arriva |
| **[[nor_transition_on]]** | **[[nor_transition_on]]** | ||
| - | //OR between fronts of the input signals. If more than one front ON is simultaneously, it is considered a single front. The output remains at 1 for a single machine cycle// | + | //NOR between |
| - | + | ||
| - | OR tra fronti ON dei segnali in ingresso. Se più di un fronte ON contemporaneamente (nello stesso ciclo macchima), si considera un solo fronte. L' | + | |
| + | NOR tra fronti ON dei segnali in ingresso. Se arriva più di un fronte ON nello stesso ciclo macchima, si considera un solo fronte. L' | ||
| /* | /* | ||
| Linea 372: | Linea 384: | ||
| */ | */ | ||
| - | |||
| **[[last_change]]** | **[[last_change]]** | ||
| - | //The output replicates the last changed input assigning a priority to the higher index input if more than one signal changes | + | //The output replicates the last changed input assigning a priority to the higher index input in the case of multiple inputs changed |
| - | L' | + | L' |
| **[[nlast_change]]** | **[[nlast_change]]** | ||
| - | //The output replicates the opposite of the last changed input assigning a priority | + | //Function invert with respect |
| - | L' | + | Funzione negata rispetto alla funzione " |
| **[[last_change_all]]** | **[[last_change_all]]** | ||
| - | //The output replicates the last changed input considering in sequence | + | //The output replicates the last changed input considering |
| - | + | ||
| - | L' | + | |
| + | L' | ||
| **[[nlast_change_all]]** | **[[nlast_change_all]]** | ||
| - | //The output replicates the opposite of the last changed input considering in sequence | + | //The output replicates the opposite of the last changed input considering |
| - | L' | + | L' |
| **[[time_meter]]** | **[[time_meter]]** | ||
| Linea 405: | Linea 415: | ||
| Misura l' | Misura l' | ||
| - | |||
| **[[counter_up_dw]]** | **[[counter_up_dw]]** | ||
| - | //Counter | + | //Forward / reverse counter, the ON edges of the input inputs are counted according to a mode specified in the byte mode. |
| - | + | The inputs in the order listed, from right to left, in odd position give ck up, in the same position as ck dw// | |
| - | Contatore avanti | + | |
| + | Contatore avanti / indietro, vengono contati i fronti ON degli ingressi ingresso secondo una modalità specificata nel byte mode. | ||
| + | Gli ingressi nell' | ||
| + | |||
| **[[counter_up]]** | **[[counter_up]]** | ||
| Linea 427: | Linea 438: | ||
| **[[powermeter]]** | **[[powermeter]]** | ||
| - | // | + | // |
| Calcola automaticamente un numeratore / periodo misurato (i calcoli sono fatti tra numeri interi), es. Potenza misurata dal contatore energia o calcolo della frequenza di un segnale | Calcola automaticamente un numeratore / periodo misurato (i calcoli sono fatti tra numeri interi), es. Potenza misurata dal contatore energia o calcolo della frequenza di un segnale | ||
| Linea 433: | Linea 444: | ||
| **[[power_on]]** | **[[power_on]]** | ||
| - | //It cuts off power to the RASPBERRY PI when the battery is discharging and there is no more activity on the serial because RASPBERRY PI has completed the shut-down, but if power supply is OK and only the serial is missing then it removes and restores power to give a reboot to RASPBERRY PI, if, on the other hand, there is no activity on the serial line because the power supply is insufficient, | + | //It cuts off power to the RASPBERRY PI when the battery is discharging and there is no more activity on the serial because RASPBERRY PI has completed the shut-down, but if power supply is OK and only the serial is missing then it removes and restores power to give a reboot to the RASPBERRY PI, if, on the other hand, there is no activity on the serial line because the power supply is insufficient, |
| Toglie alimentazione al RASPBERRY PI quando la batteria si stà scaricando e non c'è piu attività sulla seriale perchè RASPBERRY PI ha completato lo shut-down, ma se alimentazione ok e manca solo attivita sulla seriale allora toglie e ripristina alimentazione per dare un reboot al RASPBERRY PI, se invece manca attvità sulla seriale perchè alimentazione insufficiente, | Toglie alimentazione al RASPBERRY PI quando la batteria si stà scaricando e non c'è piu attività sulla seriale perchè RASPBERRY PI ha completato lo shut-down, ma se alimentazione ok e manca solo attivita sulla seriale allora toglie e ripristina alimentazione per dare un reboot al RASPBERRY PI, se invece manca attvità sulla seriale perchè alimentazione insufficiente, | ||
| + | **[[rms_power]]** | ||
| + | |||
| + | //Function to acquire the RMS value of one or two analog inputs, with possible calculation of real power, apparent power, cosphi, and phase shift time between the two channels// | ||
| + | |||
| + | Funzione per acquisire il valore RMS di uno o due ingressi analogici con eventuale calcolo di potenza reale, potenza apparente, cosfi, e tempo di sfasamento tra i due canali | ||
| + | |||
| + | ---- | ||
| + | |||
| + | {{counter}} person(s) visited this page until now. | ||
| + | |||
| + | ~~DISCUSSION~~ | ||