Different connection results: PLIN-View PRO vs. PLIN_API_Console.py
Posted: Thu 1. Aug 2024, 16:38
Hardware:
PLIN-USB, PC
Software:
PEAK software downloaded within past week. PLIN_API_Console.py is internally dated 09.11.2015
Python 3.10, Win10
Goal:
Control several PLIN-BUS in production setting to test functionality of manufactured pump product at various stages of build. Using Python with variety of meters, sensors etc.
Try:
PLIN-View PRO
Set connection as master. Controlling simple pump with only 2 valid LIN frames, one as publisher (cmd speed), the other subscribe the resulting data.
Setup with known LDF file
Everything works perfectly, very clear, very nice. Great simple program! I can switch the USB ports, power up/down the PLIN-Bus, never fails.
PLIN_API_Console.py
Running program as intended, tried both from IDLE or directly.
1. If PLIN-View PRO was run earlier in session, the API_Console.py works fine, and correctly identifies my 2 valid frames, no issues.
However.
2. if I switch USB ports, or power down the PC, or turn off power to the PLIN-USB, the API_Console.py might not connect properly. Does NOT identify valid publisher frame. CANNOT command speed. API_Console.py does NOT ask for frame data, as it does in 1. above. I can however see the subscriber frame correctly.
3. I then modify the API_Console.py, add various delays within the initialize() methos, using typical Python time.sleep(). Still variable success as in 2. above
So it seems the PLIN-View PRO has slightly more robust connection protocol than the API_Console.py Makes sense, the API_Console is now getting old. Any idea what API commands might help?
Andy
PLIN-USB, PC
Software:
PEAK software downloaded within past week. PLIN_API_Console.py is internally dated 09.11.2015
Python 3.10, Win10
Goal:
Control several PLIN-BUS in production setting to test functionality of manufactured pump product at various stages of build. Using Python with variety of meters, sensors etc.
Try:
PLIN-View PRO
Set connection as master. Controlling simple pump with only 2 valid LIN frames, one as publisher (cmd speed), the other subscribe the resulting data.
Setup with known LDF file
Everything works perfectly, very clear, very nice. Great simple program! I can switch the USB ports, power up/down the PLIN-Bus, never fails.
PLIN_API_Console.py
Running program as intended, tried both from IDLE or directly.
1. If PLIN-View PRO was run earlier in session, the API_Console.py works fine, and correctly identifies my 2 valid frames, no issues.
However.
2. if I switch USB ports, or power down the PC, or turn off power to the PLIN-USB, the API_Console.py might not connect properly. Does NOT identify valid publisher frame. CANNOT command speed. API_Console.py does NOT ask for frame data, as it does in 1. above. I can however see the subscriber frame correctly.
3. I then modify the API_Console.py, add various delays within the initialize() methos, using typical Python time.sleep(). Still variable success as in 2. above
So it seems the PLIN-View PRO has slightly more robust connection protocol than the API_Console.py Makes sense, the API_Console is now getting old. Any idea what API commands might help?
Andy