<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Problem configuring the 750-638 Counter for Hall-type sensor</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/e334d5c236/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/e334d5c236/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/e334d5c236/</id><updated>2020-02-27T22:34:39.773000Z</updated><subtitle>Recent posts to Problem configuring the 750-638 Counter for Hall-type sensor</subtitle><entry><title>Problem configuring the 750-638 Counter for Hall-type sensor</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e334d5c236/?limit=25#6443" rel="alternate"/><published>2020-02-27T22:34:39.773000Z</published><updated>2020-02-27T22:34:39.773000Z</updated><author><name>sarathbabu</name><uri>https://forge.codesys.com/u/sarathbabu/</uri></author><id>https://forge.codesys.com5d7067c0f76a3e3600b8e008cd908976dd7c404f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;  &lt;span class="nv"&gt;You&lt;/span&gt; &lt;span class="nv"&gt;can&lt;/span&gt; &lt;span class="nv"&gt;use&lt;/span&gt; &lt;span class="nv"&gt;arrays&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;your&lt;/span&gt; &lt;span class="nv"&gt;requirement&lt;/span&gt;.&lt;span class="nv"&gt;But&lt;/span&gt; &lt;span class="nv"&gt;am&lt;/span&gt; &lt;span class="nv"&gt;not&lt;/span&gt; &lt;span class="nv"&gt;sure&lt;/span&gt; &lt;span class="nv"&gt;about&lt;/span&gt; &lt;span class="nv"&gt;sending&lt;/span&gt; &lt;span class="nv"&gt;email&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt; &lt;span class="nv"&gt;log&lt;/span&gt; &lt;span class="nv"&gt;but&lt;/span&gt; &lt;span class="nv"&gt;alarms&lt;/span&gt; &lt;span class="nv"&gt;list&lt;/span&gt; &lt;span class="nv"&gt;you&lt;/span&gt; &lt;span class="nv"&gt;can&lt;/span&gt; &lt;span class="k"&gt;send&lt;/span&gt; &lt;span class="nv"&gt;e&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;mail&lt;/span&gt;.
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Problem configuring the 750-638 Counter for Hall-type sensor</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e334d5c236/?limit=25#faab" rel="alternate"/><published>2020-02-27T22:34:38.159000Z</published><updated>2020-02-27T22:34:38.159000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com9fdfd138035756b25748dc01861e0ca1fe54a38d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Supra^&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;shooter hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
so i wrote you a starter, in FBD&lt;br/&gt;
a big library can be found at &lt;a class="" href="http://www.oscat.de" rel="nofollow"&gt;http://www.oscat.de&lt;/a&gt; download the lib and the txt version, a good way to learn ST&lt;br/&gt;
and the manual in english.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sorry for the delay. I got the program working, and have done a couple of these in the means of checking actual flows and cooling/heating capacitys in kW.&lt;/p&gt;
&lt;p&gt;Now, the next thing that i'm working on, is to have some kind of logging for the device, shortly like this:&lt;/p&gt;
&lt;p&gt;Measurement of cooling power in kW every minute for 60 minutes, calculates it to kWh, and stores it somewhere. Then i need to store the data somewhere for a month at a time, and then send the list (possibly with e-mail) with medium kWh for the whole month, and maybe sorted per day or hour also.&lt;/p&gt;
&lt;p&gt;Is this doable with arrays, or some other type of listing/logging? I have zero knowledge of creating arrays  &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Problem configuring the 750-638 Counter for Hall-type sensor</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e334d5c236/?limit=25#9227" rel="alternate"/><published>2020-02-27T22:34:33.775000Z</published><updated>2020-02-27T22:34:33.775000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.comad5b67ea3605866a961e92606ed2777d537e2d25</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;so i wrote you a starter, in FBD&lt;/p&gt;
&lt;p&gt;a big library can be found at  w &lt;a class="" href="http://www.oscat.de" rel="nofollow"&gt;www.oscat.de&lt;/a&gt; w  download the lib and the txt version, a good way to learn ST&lt;br/&gt;
and the manual in english.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=323" rel="nofollow"&gt;counter20120509.pro &lt;span&gt;&lt;span&gt;[31.38 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Problem configuring the 750-638 Counter for Hall-type sensor</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e334d5c236/?limit=25#d203" rel="alternate"/><published>2020-02-27T22:34:32.170000Z</published><updated>2020-02-27T22:34:32.170000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com69dd6a47f097d223c58d1a689a75f8189b861fa4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Supra^&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;shooter hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
so now for the inputword.&lt;br/&gt;
open PLC configuration and add on the K bus your inputunits in the seqeunce as they are on your PLC.&lt;br/&gt;
now the system will give you back the Bits and bytes where everything is.&lt;br/&gt;
my computer puts it in bytes, but you can use words. &lt;br/&gt;
now doubleclick on AT %IXB2 and give a name (cntlow)&lt;br/&gt;
do same with %IXB3 (cnthigh)&lt;br/&gt;
these are GLOBAL VARS and can be used anywhere&lt;br/&gt;
see global vars under resources.&lt;br/&gt;
power up the plc and check if led is blinking.&lt;br/&gt;
make program with these two bytes.&lt;br/&gt;
just for display&lt;br/&gt;
then convert BYTE_TO_word cnthigh&lt;br/&gt;
mul with 256 and add cntlow.&lt;br/&gt;
ask for %IW1 this should be same&lt;br/&gt;
for other channel it is %IW3 (%IB6 and 7)&lt;br/&gt;
normal the analog comes first but as this block is in words it does give the 464 the words 4 and 5&lt;br/&gt;
for other module outputs it starts at %QW4 or %QX4.0&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;hoping it helps you.&lt;br/&gt;
if not you can email me at  e &lt;a class="" href="mailto:shooter@home.nl"&gt;shooter@home.nl&lt;/a&gt; e &lt;br/&gt;
or skype paul.deelen&lt;/p&gt;
&lt;p&gt;The hardware-configuration is OK, and the LEDs are blinking, and data received. As for the program, i made the test with BYTEs and WORD, it works. Now i'm trying to do the counter, and have absolutely no idea where to begin. I read the CoDeSys &amp;amp; OSCAT manuals regarding timers and counters, but didn't learn/find anything.&lt;/p&gt;
&lt;p&gt;I found out that there's a counter reset (&lt;strong&gt;%QX0.5: BOOL&lt;/strong&gt;) and a counter pause (&lt;strong&gt;%QX0.4&lt;/strong&gt;), so i thought they could be used and something as following:&lt;br/&gt;
1. Reset counter&lt;br/&gt;
2. Run timer for 2 seconds&lt;br/&gt;
3. Pause counter&lt;br/&gt;
4. Store result in variable&lt;br/&gt;
-&amp;gt;return to step 1.&lt;/p&gt;
&lt;p&gt;I'm definitely not asking you guys to write the whole code for me, just to give me a start so i can understand a little of how this works. Should i use FBD or ST (IL is out of the question as i don't understand it at all). How do i get the time correct, should things be unpaused and unreseted also (because the output variables are BOOL)?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Problem configuring the 750-638 Counter for Hall-type sensor</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e334d5c236/?limit=25#091c" rel="alternate"/><published>2020-02-27T22:34:30.578000Z</published><updated>2020-02-27T22:34:30.578000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.comb2bab9eb180d4861993d9ec1546b8e587ae15b15</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Okey found your problem&lt;br/&gt;
on the 881 connect the 24 volt on 2&lt;br/&gt;
connect the minus on 3&lt;br/&gt;
make a bridge from 6 to 1&lt;br/&gt;
make a bridge from 7 to 5&lt;br/&gt;
both to give power to the controller&lt;br/&gt;
put the 638 as first unit watch the small fins that make contact to the 24 Volt of the controller.&lt;br/&gt;
put the 464 as second or behind every unit having these power contacts.&lt;br/&gt;
put a 600 as last unit to make communication in the set.&lt;br/&gt;
on the 638 make a connection between 4 and 3&lt;br/&gt;
put the signal on 1&lt;br/&gt;
put the plus of the sensor on 2 and the minus on 7&lt;br/&gt;
2 and 6 are +24 V&lt;br/&gt;
and 3 and 7 are minus.&lt;br/&gt;
there must be 24 volt power supply to the 638 unit to work.&lt;/p&gt;
&lt;p&gt;As you can see the 464 has no power contacts and can not give power to a rightside neighbour,&lt;br/&gt;
in normal way it is impossible to make this as you can not slide it in normal way.&lt;/p&gt;
&lt;p&gt;so now for the inputword.&lt;br/&gt;
open PLC configuration and add on the K bus your inputunits in the seqeunce as they are on your PLC.&lt;br/&gt;
now the system will give you back the Bits and bytes where everything is.&lt;br/&gt;
my computer puts it in bytes, but you can use words. &lt;br/&gt;
now doubleclick on AT %IXB2 and give a name (cntlow)&lt;br/&gt;
do same with %IXB3 (cnthigh)&lt;br/&gt;
these are GLOBAL VARS and can be used anywhere&lt;br/&gt;
see global vars under resources.&lt;/p&gt;
&lt;p&gt;power up the plc and check if led is blinking.&lt;/p&gt;
&lt;p&gt;make program with these two bytes.&lt;br/&gt;
just for display&lt;br/&gt;
then convert BYTE_TO_word cnthigh&lt;br/&gt;
mul with 256 and add cntlow.&lt;br/&gt;
ask for %IW1 this should be same&lt;/p&gt;
&lt;p&gt;for other channel it is %IW3 (%IB6 and 7)&lt;/p&gt;
&lt;p&gt;normal the analog comes first but as this block is in words it does give the 464 the words 4 and 5&lt;/p&gt;
&lt;p&gt;for other module outputs it starts at %QW4 or %QX4.0&lt;/p&gt;
&lt;p&gt;hoping it helps you.&lt;br/&gt;
if not you can email me at  e &lt;a class="" href="mailto:shooter@home.nl"&gt;shooter@home.nl&lt;/a&gt; e &lt;br/&gt;
or skype paul.deelen&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Problem configuring the 750-638 Counter for Hall-type sensor</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e334d5c236/?limit=25#60ac" rel="alternate"/><published>2020-02-27T22:34:26.087000Z</published><updated>2020-02-27T22:34:26.087000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comf47bfee2440ceda89daec11c409db7bb4ee71fdb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Supra^&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;shooter hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
On your 638 you see a small LED on the leftside.&lt;br/&gt;
the led must be in a circuit so if you make a wire from the D1- input (15) to ground the circuit is complete.&lt;br/&gt;
this way you can also use pnp and npn contacts.&lt;br/&gt;
yes you may use up to 30 volts on the input.&lt;br/&gt;
(current sensitive circuit inside)&lt;br/&gt;
LED B (DI1 should flash.)&lt;br/&gt;
if no luck give message&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;I tried out this just now, and it seems that the LED doesn't flash.&lt;/p&gt;
&lt;p&gt;EDIT: when DI- grounded, the rotation pulse went to 0Hz&lt;/p&gt;
&lt;p&gt;EDIT2: Problem solved! I've forgotten to put pull-up resistors on the signal, so it never fluctuated between 0-24V, instead something like maybe 0-2V. I couldn't prove this because i didn't have an oscilloscope, only a normal multimeter... Can't believe how i managed to miss it, as i always have used pull-up resistors in my previous projects   &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Then to the next problem:&lt;/strong&gt; How do i tell codesys to count for the amount of pulses for a certain time (let's say 2 seconds) and store it as a variable?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Problem configuring the 750-638 Counter for Hall-type sensor</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e334d5c236/?limit=25#5850" rel="alternate"/><published>2020-02-27T22:34:24.415000Z</published><updated>2020-02-27T22:34:24.415000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com605fb84e4fa389a8ec85f1267d4a776183e4d045</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;On your 638 you see a small LED on the leftside.&lt;br/&gt;
the led must be in a circuit so if you make a wire from the D1- input (15) to ground the circuit is complete.&lt;br/&gt;
this way you can also use pnp and npn contacts.&lt;br/&gt;
yes you may use up to 30 volts on the input.&lt;br/&gt;
(current sensitive circuit inside)&lt;br/&gt;
LED B (DI1 should flash.)&lt;br/&gt;
if no luck give message&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Problem configuring the 750-638 Counter for Hall-type sensor</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e334d5c236/?limit=25#5c12" rel="alternate"/><published>2020-02-27T22:34:19.915000Z</published><updated>2020-02-27T22:34:19.915000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com203ae648a935e8facc1449bfff6835199a32a919</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Supra^&lt;/p&gt;
&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;I'm fairly new to programming with CoDeSys, but i've managed to program a couple of 750-series controllers with tasks like SNMP-&amp;gt;Modbus converters.&lt;/p&gt;
&lt;p&gt;At the moment i'm working on a remote management to a cooling device, and i need information on water flow. For this i'm using the 750-638 up/down counter, but i'm a bit confused with the wiring, because i'm not getting any data out of it.&lt;/p&gt;
&lt;p&gt;My PLC setup:&lt;/p&gt;
&lt;p&gt;I have 4 NTC-sensors and 2 Flowmeters connected.&lt;br/&gt;
These are the NTC-sensors.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Input1&lt;/span&gt; &lt;span class="nt"&gt;AT&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="nt"&gt;IW0&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;WORD&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Input2&lt;/span&gt; &lt;span class="nt"&gt;AT&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="nt"&gt;IW1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;WORD&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Input3&lt;/span&gt; &lt;span class="nt"&gt;AT&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="nt"&gt;IW2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;WORD&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Input4&lt;/span&gt; &lt;span class="nt"&gt;AT&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="nt"&gt;IW3&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;WORD&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;(They give the temperature in celsius*10 and i had to write a converter which divides the input and writes it as a REAL value with a decimal, is there btw an easier way to do this than to have a function for the task?)&lt;/p&gt;
&lt;p&gt;Then the UP/DOWN counter &amp;amp; Flowmeters; I've tested all kinds of adresses (%IW4-%IW10) with all kinds of variable types, and it always stays at 0. I've also tested fetching with %IX4.0-%IX10.11 with BOOL, and everything always stays at FALSE. &lt;br/&gt;
The datasheet for the 750-638 also didn't help me out. At the moment my HW configuration on the 638 is as follows:&lt;br/&gt;
24V pin = (24V) +&lt;br/&gt;
0V pin = (24V) -&lt;br/&gt;
DI+ pin = Signal from Hall sensor&lt;/p&gt;
&lt;p&gt;The Hall sensor itself is tested and gives an output pulse of 24V every rotation (at the moment about 26Hz = 26 RPS)&lt;/p&gt;
&lt;p&gt;Any help will be greatly appreciated (and the questions definitely don't end here   Next thing to tackle is writing the code so it calculates how many pulses per x seconds and then turning it to l/min.)&lt;/p&gt;
&lt;p&gt;PS. There is very little information in the manuals of the correct adressing and usage of correct variable type (WORD/BYTE/REAL/DINT etc.), that's why i really struggle with all this. But well, learning this is actually quite fun.  &lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bild" rel="nofollow" src="http://img12.imageshack.us/img12/8817/trolologe.jpg"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>