Doc. # 1-2403934591 | |||
---|---|---|---|
Date Updated | 03-17-2016 | Date Created | 03-17-2016 |
Document Type | Knowledge Base | Related OS | |
Related Product | ADAM-4500/ ADAM-4501/ ADAM-4502 |
IAG_FAQ ADAM-4502, DO can’t work properly with example | |||
---|---|---|---|
Solution:
What exactly should be the syntax for GetDIO and SetDO functions on the ADAM-4502?
This is the code in its attached example-EX2.c and it didn’t work as expected:
GetDIO(EB50_ID, AllChannels, 0, &div);
if(div==0) SetDO(EB50_ID,AllChannels,0,0);
else SetDO(EB50_ID,AllChannels,0,1);
First of all, they had to change EB50 to EB11 because EB50 only work on ADAM-4501 and EB11 is the correct for ADAM-4502.
Second, GetDIO always returns 0 which must mean that it can read successfully. However, div is always 0x00 even when DI is set to high.
Finally, when trying SetDO(EB11_ID,AllChannels,0,1); it doesn’t change the value of the DO.
|
|||
Download File | Release Date | Download Site | |
IAG_FAQ ADAM-4502, DO can’t work properly with example.pdf (0) | 03-25-2016 |