CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Runtime Configuration of Electronic Module

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mka879



Joined: 30 Oct 2015
Posts: 34

View user's profile Send private message

Runtime Configuration of Electronic Module
PostPosted: Tue Apr 19, 2016 4:52 am     Reply with quote

I am working on remote monitoring module of generators. We want to have configuration of different parameters such as sensor type selection,etc.

For example there are 5 major temperature sensor vendors each have different response curve(Voltage vs Temperature). One static approach can be to hardcode any one response in the micro-controller. Now if a generator have a different sensor we would like the to configure our controller for that sensor. I am not sure how I may do this in software such that if a user want to configure while monitoring action is in progress, he/she may configure the controller and then return back to monitoring. I came through function pointer technique but not sure if this is the way to do it. Maybe I can set few switches and read the state of the port to determine the configuration user want to achieve.

Please comment on how may I achieve this.
temtronic



Joined: 01 Jul 2010
Posts: 9246
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Apr 19, 2016 5:15 am     Reply with quote

Since you don't have control over what sensors are on the generators....

The simplest, easiest, and 'universal' way is to spend a $1 an a 'small' PIC that connects between the sensor and your 'controller' PIC. This small PIC becomes part of the 'temperature sensor module' attached to the generator. It reads the sensor, converts data as required, then sends it to the 'controller' PIC.
Each small PIC only needs to be 'calibrated' to the sensor once, The controller PIC always sees the same format or type of data from any/all generators. effectively you've got a small network of 5 slaves and one master. I'd probably use RS-485 for the interconnections.

This technique only cost you an extra $5 and allows any number of slaves to be added at any time. I've done it for 20 years without any problems.


Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group