-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"self" variable in OPC-N3_rec.py #4
Comments
Hello thanks for your message.
Self is a variable used inside classes in python to call itself. This is
used when you want to set initial variables for the class. self.initOPC
does just that. It turns on the OPC and sets the initial variables.
THis can also be called multiple times inside the same class, as it also
inside the self. This is used for restarts inside the OPC-N3_rec.py code
If you set up the variable.py file with your OPC port location and run
start.py should all work. Did you test this code ?
kind regards
2022年4月14日(木) 23:08 RS ***@***.***>:
… Hello,
Inside the OPC-N3_rec.py, a lot of the def includes two variable (self,
somethingelse). however when ever they are called in the main loop, it only
has one variable. As well as there is something called "self.initOPC(ser)"
What exactly does it do as this is not found in the OPC-N3_test.py.
Is it something that is required? I"m looking to just run just the OPC-N3
on my pi and finally getting the test version to work, it seemed quite
promising.
Thanks!
—
Reply to this email directly, view it on GitHub
<#4>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKZBQTA6JS2QDD3FTELLAIDVFARFPANCNFSM5TN4QNSA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Ahhh I didn't think the OPC-N3_rec.py relied on running start.py, I'd figured that it since the test worked normally, I could've ran the _rec.py the same way. I haven't tried the start.py yet as there was a ton of syntax issue I ran into, I gave start.py and I'm running into more syntax and name errors like the following,
I'll try to go through it and hopefully not break it anymore. Thanks! |
Inside start.py I noticed this error
The last thing is I can't seem to figure out how to fix this, however if i commented it out I was able to get it to run |
Hello,
Inside the OPC-N3_rec.py, a lot of the def includes two variable (self, somethingelse). however when ever they are called in the main loop, it only has one variable. As well as there is something called "self.initOPC(ser)" What exactly does it do as this is not found in the OPC-N3_test.py.
Is it something that is required? I"m looking to just run just the OPC-N3 on my pi and finally getting the test version to work, it seemed quite promising.
Thanks!
The text was updated successfully, but these errors were encountered: