Cause:
A value outside the GDO value range was assigned to GDO; that is, the value of the 2nd parameter of the GDOSet statement is outside the value range of the first parameter GDO.
Troubleshooting:
Check the number of GDO port numbers and the value of the 2nd parameter in the GDOSet statement reporting the error, and whether the 2nd parameter value is outside the GDO value range.
Solution:
Modify the 2nd parameter value of the GDO statement to assign a valid value to GDO.
Case sharing:
GDOSet(gdo1,uint0)
If the starting port numbers of gdo are 3 and 5 respectively, and uint0 is 20, the value range of gdo is 0-7. Since uint0 is 20, it exceeds the value range of gdo1, so error 152 is reported when the statement runs.