Jump to content
  • 0

Multiple MCC 134 HATs on Raspberry Pi with 8 thermocouples input


seraph333
 Share

Question

Hi,

I connect two MCC 134 HAT on Raspberry Pi, I need 8 thermocouples input at the same time.

What is the python code to address both Channel/HAT and input eight temperature?

 

 

Thanks,

Edited by seraph333
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
3 hours ago, Jeffrey said:

Please see the attached example.

regards,

 

mcc_134_x2.py 4.49 kB · 0 downloads

Thanks, Jeffrey.

Another question is for the 

delay_between_reads = 1.

Is that possible to set it to less than 1 second? Such as 0.1 second? Or even without delay. Because the thermocouple input is going to compare with the set point then do PID control, to control a heater, the whole heating process supposed to less than 30 seconds. If every time it take 8 seconds to get the input, not sure the correction will be made within 3 loops.

Link to comment
Share on other sites

  • 0

Per the published spec, update interval is 1 second minimum.

That's between reads of the same channel.

The example I sent you was based on the single_value_read.py example.  

When you put it like that, the name of that variable, 'delay_between_reads' is poorly named.  

it was meant to mean, if you only read one channel repeatedly, you need to wait 1 second between reads.

In this case it would really be, read all the channels as fast as the RPi etc can, then wait 1 second before you loop. 

it is really a 'delay_between_a_scan_of_all_channels', but that's just too long a name of a variable!

For you needs, assuming you have the whole 30 seconds, it would loop through all channels, 30 times.

You are welcome to try setting a shorter sleep, but you may just get the same data repeated, not updated.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...