Comms Simulation and PIN Read on UNO

For general Flowcode discussion that does not belong in the other sections.
Post Reply
User avatar
p.erasmus
Posts: 434
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Comms Simulation and PIN Read on UNO

Post by p.erasmus »

Hi All,

I just want to ask during the Comms Simulation is there another way to read a Pin which is defined in the properties of the I2C at the moment it seems it is only possible by using the SCADA macro IOGetInput() as below( I need this pin as the ADC asserts this pin when the conversion is completed and the data should be read,

P2.jpg
P2.jpg (35.59 KiB) Viewed 1756 times
In the real component(after) exposing it should read the RDY pin specified by the user as below
Or should I just use the IOGetInput() macro and as a last step replace that part with a read to the real pin in code only problem is if the user will do Comms simulation then the code will not work , may be you guys have better solution

P1.jpg
P1.jpg (49.93 KiB) Viewed 1756 times

Thanks as always appreciate your time and efforts
Regards Peter - QME Electronics

BenR
Matrix Staff
Posts: 1774
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 452 times
Been thanked: 612 times

Re: Comms Simulation and PIN Read on UNO

Post by BenR »

Hi Peter,

That's a tricky one, reading the pin like your doing is certainly one way.

Is there a maximum time to be ready where you could just delay for that maximum time and then be sure that the sample is done and ready to collect? Might slow things down a bit but keeps the sim simple.

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Comms Simulation and PIN Read on UNO

Post by p.erasmus »

Hi Ben,

Thanks ,yes it has a sample time so at 860 SPS you need with the internal 1MHZ OSC 1.2mSec +/-10% so around 2mSEC I can delay it
for testing that is ok ,reading the PIN is slower might be slower but I am not testing for real time sampling so it more getting the function correctly for the component and in the real HW it can read the PIN ,

This is working on the SCADA reading the pin as I do .
just was thinking if there is other possibilities..

Thanks again
Regards Peter - QME Electronics

Post Reply