Go Back   Wiremod Forums > Wiremod Skills > Wiremod Tutorials

Wiremod Tutorials Post your wiremod tutorials/guides here.

Reply
 
LinkBack Thread Tools Display Modes
Old 07-15-2008   #1 (permalink)
Newbie
 
Wulfie's Avatar
 

Join Date: Jul 2008
Posts: 3
Wulfie is on a distinguished road
Default [REQ] A Automated Systems controller [Read post =.=]

Ok, well lately I've been interested in making "Production plants" in Gmod with Life Support 2, such as a Nuclear Powerplant, a Gas production facility, and Energy stations, and what I've been needing for a while is some sort of automated computer system in wiremod (which can be done), that would turn on a pump automatically when it is needed, (such as if I am low on water, It would turn on an extra water pump) and I can't figure out what to do to make such a thing. All I have been able to do is to put a lot of panels with info on my systems and put alot of buttons to press for each thing. I don't know if this would go in the CPU section, or here as I am new to this forum, so moderators feel free to move this. Can someone help me make a thing such as I described above?



~Wulfie
Wulfie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-15-2008   #2 (permalink)
Member
 
1xinfusion's Avatar
 

Join Date: Apr 2007
Posts: 46
1xinfusion is on a distinguished road
Default Re: [REQ] A Automated Systems controller [Read post =.=]

Quote:
Originally Posted by Wulfie View Post
Ok, well lately I've been interested in making "Production plants" in Gmod with Life Support 2, such as a Nuclear Powerplant, a Gas production facility, and Energy stations, and what I've been needing for a while is some sort of automated computer system in wiremod (which can be done), that would turn on a pump automatically when it is needed, (such as if I am low on water, It would turn on an extra water pump) and I can't figure out what to do to make such a thing. All I have been able to do is to put a lot of panels with info on my systems and put alot of buttons to press for each thing. I don't know if this would go in the CPU section, or here as I am new to this forum, so moderators feel free to move this. Can someone help me make a thing such as I described above?



~Wulfie
scenario:
auto replenishing air tank

find the air amount output of the tank

wire it to (a) of less than chip

make constant value chip with the value you want the compressor to turn on at (ie , 2000)

wire this to (b) of less than chip

then wire the less than chip to your compressor.

the whole point of this is to turn on the compressor when less than a certain level

i hope this is what you were looking for !
1xinfusion is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-15-2008   #3 (permalink)
Newbie
 
Wulfie's Avatar
 

Join Date: Jul 2008
Posts: 3
Wulfie is on a distinguished road
Default Re: [REQ] A Automated Systems controller [Read post =.=]

Quote:
Originally Posted by 1xinfusion View Post
scenario:
auto replenishing air tank

find the air amount output of the tank

wire it to (a) of less than chip

make constant value chip with the value you want the compressor to turn on at (ie , 2000)

wire this to (b) of less than chip

then wire the less than chip to your compressor.

the whole point of this is to turn on the compressor when less than a certain level

i hope this is what you were looking for !
I'll try that, but can I also do what you said in reverse to turn things off?

EDIT: I just tried it and it WORKS!! Thank you for your help!

Last edited by Wulfie; 07-15-2008 at 11:19 PM.. Reason: Why should you know? o.o
Wulfie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-14-2008   #4 (permalink)
Newbie
 
Caffeinated Sentry Gnome's Avatar
 

Join Date: Oct 2008
Posts: 4
Caffeinated Sentry Gnome is on a distinguished road
Default Re: [REQ] A Automated Systems controller [Read post =.=]

how bout a system that starts at value x and then stops a value y

the air stops drops to 3000 the air compressors start and keep going to 6000 and then stop.

how would you do that?

PS something that can be used on any system like that. not just tied air.
Caffeinated Sentry Gnome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-14-2008   #5 (permalink)
Advanced Member
 
Magos Mechanicus's Avatar
 

Join Date: May 2008
Posts: 136
Magos Mechanicus is on a distinguished road
Default Re: [REQ] A Automated Systems controller [Read post =.=]

Haven't tested it, but I think this should deliver that.
Code:
N@Generatorcontrol
I@Currentvalue Minvalue Stopvalue
O@On
Currentvalue<=Minvalue->On=1;
Currentvalue>=Stopvalue&On->On=0;
To make it with just gates, you could use a Toggle(Edge triggered), with input values 0 and 1, and wire the Clk to an Or(Any) gate. The Or(Any) gate you then wire to a Less Than/Less Than or Equal gate comparing the current amount of air to the minimum value. In addition, you would wire the Or gate to a Greater Than/Greater Than or Equal gate comparing the current value to the value it should stop at.
Magos Mechanicus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-14-2008   #6 (permalink)
Newbie
 
Caffeinated Sentry Gnome's Avatar
 

Join Date: Oct 2008
Posts: 4
Caffeinated Sentry Gnome is on a distinguished road
Default Re: [REQ] A Automated Systems controller [Read post =.=]

is that CPU code?
im new as you probably guessed?
Caffeinated Sentry Gnome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-14-2008   #7 (permalink)
Advanced Member
 
Magos Mechanicus's Avatar
 

Join Date: May 2008
Posts: 136
Magos Mechanicus is on a distinguished road
Default Re: [REQ] A Automated Systems controller [Read post =.=]

Oh right. That's Expression (1) code. If you want to save it for the expression gate you'll have to make a .txt (name it something you remember) with that code and save it in your Steam/steamapps/<your Steam account name here>/garrysmod/garrysmod/data/ExpressionGate folder. Then you use the Expression gate tool ingame to spawn the gate with that code. Or you could try making it with just the standard gates. Sorry if my explanation was a bit hard to understand there.
Magos Mechanicus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-14-2008   #8 (permalink)
Newbie
 
Caffeinated Sentry Gnome's Avatar
 

Join Date: Oct 2008
Posts: 4
Caffeinated Sentry Gnome is on a distinguished road
Default Re: [REQ] A Automated Systems controller [Read post =.=]

well i had a go at the gates and got it working. i'll have a go at the expression one tomorrow, its late and i need sleep

thanks for you help
Caffeinated Sentry Gnome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-14-2008   #9 (permalink)
COMPLETE BLOODY BASTARD

 
AzraelUK's Avatar
 

Join Date: Aug 2007
Location: Camelot, it is a silly place.
Posts: 580
AzraelUK is on a distinguished road
Send a message via MSN to AzraelUK
Default Re: [REQ] A Automated Systems controller [Read post =.=]

One way would be to use an SR-latch. S goes to a Less Than gate, R goes to a Greater Than gate. I'm I'm sure you can figure out the rest.
__________________
A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.
—Antoine De Saint-Exupery
AzraelUK is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-14-2008   #10 (permalink)
UWSVN Contributor
 
Hitman271's Avatar
 

Join Date: Feb 2008
Location: Alabama, USA
Posts: 385
Hitman271 is on a distinguished road
Send a message via Yahoo to Hitman271
Default Re: [REQ] A Automated Systems controller [Read post =.=]

Code:
start:
jmp Real_start
alloc minval
alloc stopval

Real_start:
in eax,0 //Currentvalue
cmp eax,#minval
cle On_off

cmp eax,#stopval
cge On_on
jmp Real_start

On_off:
out 0,0 //Port 0 out is the on
ret

On_on:
out 0,1
ret
No my friends, THIS is cpu code and my 200th post!
__________________
Quote:
Originally Posted by Anticept View Post
It is not some place where you can toss your dick around and expect people to suck it.
Quote:
Originally Posted by Black Phoenix on Fixing the Gpu
When I get laid
READ AND GET SEXAH PRONZ OR DONT AN GET BANNED

IF ALL ELSE FAILS THEN READ THIS BEFORE MAKING A HELP THREAD

Remember to ask me for cpu help if you need it, just pm me with your situation and/or problem code
Hitman271 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -7. The time now is 11:37 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.

Page top