This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Time control of company personnel
#1
Hello, I need to create a time control of the personnel of a company. Check-in / out and rest time.
Is it possible to visualize with the monthly records? For the CCAA I use Ekey. I made a record of the objects, but I don't see how to get that to a graph at the end of the day.
Reply
#2
I am creating in FB Editor, using the counter module with a pulse per minute. As a result I get the total of the day in minutes, how can I pass it to a 3-byte time format? I tried initially to use the FBeditor hour counters but I was not able to give them a value in the output.
Reply
#3
Hi, can you explain once more what is your final goal?
------------------------------
Ctrl+F5
Reply
#4
(30.03.2020, 08:17)Daniel. Wrote: Hi, can you explain once more what is your final goal?

Hi Daniel, yes.
I need to visualize and record what a staff workday would be.
Using Ekey's access control, I identify if they enter or exit. Using a pulse per minute counter, the value I get is the total minutes worked. I need to convert that value into a time format. (x minutes = x Hours: x minutes)
Reply
#5
If you just want to display it then you can write it to string object with conversion like this
Code:
minutes = event.getvalue()
grp.update('32/1/1',os.date("%M:%S", minutes))
------------------------------
Ctrl+F5
Reply
#6
(30.03.2020, 09:54)Daniel. Wrote: If you just want to display it then you can write it to string object with conversion like this
Code:
minutes = event.getvalue()
grp.update('32/1/1',os.date("%M:%S", minutes))
 Thanks Daniel, it works!
Reply
#7
I want when the event is executed and an x value to send a true. I can do it with 1 bit objects but I need 07.2 Bytes .  what else do i need to get the value?

Code:
Scanner_Rele = event.getvalue()
Scanner_Value = grp.getvalue('50/0/0')
User01 = '50/1/1'
User02 = '50/1/2'



if Scanner_Rele == true and Scanner_Value == 26 then
  grp.write (User01, true)
   end

if Scanner_Rele == true and Scanner_Value == 36 then
  grp.write (User02, true)
   end
Reply
#8
You need to change it to event script triggered by tag. Both input group has to be tagged and then use this tag to trigger the script. Change the event.getvalue() to grp.getvalue('xxx')
------------------------------
Ctrl+F5
Reply
#9
(31.03.2020, 07:46)Daniel. Wrote: You need to change it to event script triggered by tag.  Both input group has to be tagged and then use this tag to trigger the script. Change the event.getvalue() to grp.getvalue('xxx')

Thanks Daniel, sorry but I can't get it to work the way you tell me.

I get it to run this way, but it fails. The script is executed before receiving the value of 2 bytes. There is a need to run the script again.

Every time a user swipes the card, a 1-bit object with a true value is sent (never returns false) and a 'xxx' value in 2bytes is sent.

I need to write an object, when those two objects send a value and the condition is met.

Code:
Scanner_Rele = event.getvalue() --01.1bit, only send true
Scanner_Value = grp.getvalue('50/0/0') --07.2bytes, user id
User01 = '50/1/1' --01.1bit
User02 = '50/1/2' --01.1bit



if Scanner_Rele == true and Scanner_Value == 26 then
  grp.write (User01, true)
   end


if Scanner_Rele == true and Scanner_Value == 36 then
  grp.write (User02, true)
   end
Reply
#10
Log both variables before IF to see if they are correct.
You don't need the second if when the conditions are the same.
------------------------------
Ctrl+F5
Reply
#11
(31.03.2020, 15:48)Daniel. Wrote: Log both variables before IF to see if they are correct. 
You don't need the second if when the conditions are the same.


Fortunately the first three shipments I execute perfectly. But normally, when changing the Value in '50 / 0/0 'the next shipment usually fails.

Attached Files Thumbnail(s)
   
Reply
#12
Post your latest script.
------------------------------
Ctrl+F5
Reply
#13
(31.03.2020, 20:39)Daniel. Wrote: Post your script latest script.
Reply
#14
The problem is that 50/0/0 arrives after 50/0/4 when your script is already executing.
Attach your script to 50/0/0 and modify it like this:
Code:
Scanner_Value = event.getvalue() --07.2bytes, user id
Scanner_Rele = grp.getvalue('50/0/4') --01.1bit, only send true
Reply
#15
(01.04.2020, 08:20)admin Wrote: The problem is that 50/0/0 arrives after 50/0/4 when your script is already executing.
Attach your script to 50/0/0 and modify it like this:
Code:
Scanner_Value = event.getvalue() --07.2bytes, user id
Scanner_Rele = grp.getvalue('50/0/4') --01.1bit, only send true


Hello Admin, I already did that test. I also have the same problem, the value of 1 bit is always true. Therefore, the condition will also be fulfilled.

Is it possible not to run the script until the two values are updated? That one value depends on the other to be executed.
Reply
#16
It's always true because that's what you have in your script. Maybe you need to toggle the value like this?
Code:
grp.write(User01, not grp.getvalue(User01))

As for correct execution order just map the script to an object that comes second. For ekey it will always be the finger ID object.
Reply


Forum Jump: