On Fri, Feb 19, 2016 at 3:32 PM, Peter Otten <__pete...@web.de> wrote:
>
>
> Also, after reading http://openopc.sourceforge.net/api.html I wonder if it
> wouldn't be better to go with the timestamp provided by the server
>
> bool1.append(opc.read(".watchdog"))
>
yes but my next
Marco Soldavini wrote:
Random remarks about your code:
> #While loop - scanning and storing OPC values at scan rate
> while (abort == 0):
The loop continues to work if you change it to
while True:
> # ESC pressed?
> if msvcrt.kbhit() and ord(msvcrt.getch()) == 27:
> abort = 1
On 19/02/16 07:51, Marco Soldavini wrote:
> Sorry, Here my code in plaintext
> ...
thanks
>> Better is to use a dictionary with your "variables"
>> data[keyName].append(value)
> Ok so I will look more into dictionaries, it is like hash tables?
Exactly.
--
Alan G
Author of the Learn to Progr
Sorry, Here my code in plaintext
#While loop - scanning and storing OPC values at scan rate
while (abort == 0):
# ESC pressed?
if msvcrt.kbhit() and ord(msvcrt.getch()) == 27:
abort = 1
break
# Server up
if opc.ping():
if opc['.run_batch'] == True and re