35 lines
693 B
Python
35 lines
693 B
Python
|
|
"""Test reading data from a Rockwell VFD."""
|
|
from powerflex import powerflex755
|
|
from time import sleep
|
|
|
|
|
|
pf755 = powerflex755("10.20.4.11")
|
|
|
|
config_values = pf755.read_configuration()
|
|
print("CONFIGURATION VALUES")
|
|
for x in config_values:
|
|
print(config_values[x])
|
|
|
|
running_vals = pf755.read_running()
|
|
print("RUNNING VALUES")
|
|
for x in running_vals:
|
|
print(running_vals[x])
|
|
|
|
command_vals = pf755.read_command()
|
|
print("COMMAND VALUES")
|
|
for x in command_vals:
|
|
print(command_vals[x])
|
|
|
|
# pf755.start()
|
|
i = 0
|
|
while(i < 10):
|
|
running_vals = pf755.read_running()
|
|
print("RUNNING VALUES")
|
|
for x in running_vals:
|
|
print(running_vals[x])
|
|
i += 1
|
|
sleep(1)
|
|
|
|
# pf755.stop()
|