@AlexanderH Hi,
I'm sorry. For some reason I didn't get an email notifying me that you had replied. I'm glad you finally resolved the issue.
Cheers,
Jan
@AlexanderH Hi,
I'm sorry. For some reason I didn't get an email notifying me that you had replied. I'm glad you finally resolved the issue.
Cheers,
Jan
@AlexanderH Hi Alexander,
do you see any error messages in the system log? If so, what kind?
Does setting the outputs work as expected?
When reading inputs, I think you should both write and read within the same I2C() call — in other words, both counters should be non-zero. Usually, sending a request and receiving a response over I²C takes much less time than the REXYGEN task execution period. That’s why the I2C() function is designed to send data and, if a response is expected, receive it within the same cycle. I don’t know the exact details of the PCF8574A protocol, but I would assume that you need to perform the write and the read together in one call.
By the way, the code you pasted looks a bit broken here on the forum – that’s probably due to Markdown formatting. Please enclose the entire script in a code block using triple backticks (```) or upload it here as a text file. That way it will be much easier to read.
Cheers,
Jan
@har Hi har,
This error is related to the timing issue of the 'data_collect' task. The task takes longer to complete than the allotted time. Based on the image, I would guess that the Python block will take the most time to execute. In your case, I would inspect the timing of the whole project and also the diagnostics of task (Target ->Diagnostics -> data_collect and select the Task tab as shown bellow).
Cheers,
Jan
@har Hi Har,
I'm sorry, but we are not able to debug third-party Python code for you.
If you made it work under plain Python, then you can send the data to REXYGEN using the REST API. Have a look at "0302-03 REST API Python Bash etc", which sends data to REXYGEN using Python.
Kind regards,
Tomas
@MikeyH Hi Mike,
This is related to the communication timeout - inspect data length with respect to baudrate and timeouts.
All REXYGEN error codes here in Docs: https://www.rexygen.com/doc/ENGLISH/MANUALS/BRef/BRef_ENGap3.html#x488-487000C
Cheers,
Tomas
@MikeyH Hi Mike,
This error is related to the timing issue of the Modbus Driver. It means that the Modbus Driver exceeded the allotted time 800x from the executive start for some reason. In your case, I would inspect the timing of the whole project and also the diagnostics of tasks related to the Modbus driver.
Without knowledge of your project, communication frame and timing, I'm not able to provide more details.
Cheers, Tomas
@MikeyH Hi Mike,
This error is triggered when something is preventing Studio from writing to the Project location. Do you have all related folders available for read and write?
If the issue persists, can you share a minimal project with us? Thanks
Cheers, Tomas
Hi har,
Check if RexCore is running. I see that you are solving the Python code in another thread. It is possible that your code is not only causing the error, but also causing the entire RexCore to crash. Try connecting to the Raspberry via SSH and enter the command:
systemctl status rexcore
Cheers,
Jan
@har Hi har,
Thanks for the additional info. We are not able to provide free support on this since it's your custom Python script. The error is not related to the Rexygen ecosystem. It seems that the CPU dispatcher is being initialised multiple times.
Tomas
@har Yes, the issue is in initialisation of the Python Block. If you wait a second with the mouse on the message
it will show you more instead of "..." which might help you to find the issue easier.
Cheers,
Tomas