ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

#153  

Hello Boris,

To answer your questions about reading files I updated the Reading and Writing with Files tutorial and if you click on the last step now you will find a link to download the Example Project file which includes the example scripts as well as a link to the training video I made specifically to answer your question because I know it will help others too.

In the project file you'll find 2 new scripts named: ReadFile_Boris and ReadFile_Boris2

And the video that shows how I created the scripts and why.

If you have follow up questions about reading or writing file data, please ask away.

#154  

Boris,

To answer your other questions I have to start by telling you I don't think you understand what those files do. The "Plug In" and everything in there which gets installed when you download the plug in is the finished product - you can't edit and change those. All of those files you mentioned attempting to edit will not help you as they do not contain anything you can edit and there is nothing in there you would want to edit (trust me I know what is in there).

In order to obtain 2 sets of variables for 2 Omron cameras your options are:

  1. use one camera at a time and perhaps store variables to a text file, one file for camera 1 and another file for camera 2 then use the data as needed OR
  2. create a new plug in by going all the way back to the "source code" which David Cochran provided, you can download it from the Plug In page for the Omron Camera, the "source code" link is right above the videos.

However, as you are aware I am already working on revisions including an options for a 2nd camera to create a new plug that I hope to complete before the end of the year, time permitting.

I mention this because if you attempt to modify the source code on your own should know I will not have time to teach you how to program in .NET to create the revision you are seeking.

#155  

Hello Justin!

Your Video is so great and usefull that i am the last 24 hours full busy with scripting!

I will post you my big answer and my hole "thank you saying" later in the night.

i only want to tell you in this moment : That you are great!

More later

Boris

#156  

Hello Justin, Hello Andy,

(and Hello to all other Robot-Fans - Hello Bob Houston, Hello WBS00001, Hello Steve, Hello Richard, Hello fxrtst. .... Hello DJ

Thanx for your hole help and teaching me EZ-Robot Scripts!

Now i want to give something back.

After the really awesome and gigantic help from Justin (Specialy his last Video)

I produce a nice little "Auto-loop-script" for the Omron Camera.

This little Script will ask you (after the Camera recognize a Face with over 700 Points) that you must look 20 seconds to the Cam and the the Robot/PC will guess your age.

This will use also the read and write Script from Justin!

Thanx Justin again for this really great Tutorial!

I add to your last Code a "Round" function - so that you will have hole numbers.



$filename = "c:\meinhirn\myfile.txt"

if (FileExists($filename) = false)
  print("File does not exist")
  Halt()
endif

FileReadReset($filename)

$szLineCount = 0
$szAge2 = 0

:START

$txt = FileReadLine($filename)

$szName = Split($txt, ",", 0)
$szAge = Split($txt, ",", 1)

if($szAge > 0)
$szAge2 = $szAge2 + $szAge
$szLineCount = $szLineCount + 1
endif 



print($szName)

 if (FileReadEnd($filename) = true)
    print("End Of File")
   
    
    goto(END)
  endif

goto(START)

:END


$szAverageAge = $szAge2 / $szLineCount
$szAverageAge = round( $szAverageAge,0 ) 
Print($szName + " is an average age of: " + $szAverageAge)
Say("You are " + $szAverageAge + " years old.")
FileReadReset($filename) 
ControlCommand("Script Manager", ScriptStart, "Surveillance")


Also you will find the hole Scripts in the EZ-Robot Cloud.

The Name is "Omron Surveillance Age" - or search for RentaPrinta Member

Here is the direct link:

https://synthiam.com/Community/EZCloud/RobotAppDetails.aspx?id=5220

I will do a upgrade/update over the weekend. That the PC will guess what you are.

A MEN or a WOMEN.

I hope this scripts will help some people with the same problems.

Boris

#157  

Ok, updated plugins for the Omron Camera. This has the updated Omron software in it and works natively with the new database format. I added a couple of simple revisions to David Cochran's original code and included sample ARC projects.

For a single camera HVCP or HVC-P2 model: PlugIn for HVCP

For those 2nd Camera users (I'm looking at you Boris, LOL) PlugIn for HVCP (Second Camera)

Anton and Boris please test when you can and let me know if anything breaks.

Reminder If you had code working with the OLD plugin you'll need to update it to use the NEW plugin because those CommandControl objects are different.

If no bugs are reported I'll do an updated usages video.

#158  

Thanks Justin, I will give it a try tomorrow morning.

Ron

#159  

Hi Justin,

Thanx also from me. I will also test like Andy, tomorrow and i will give feedback.

Boris

#160  

Hi Justin,

so i checked you two plugins and they look that they are working!

The Album is now working - NO CHANING NAMES

The second Camera is working - ALSO SECOND VALUES

GREAT!

Only the FaceX Value is still twisted with the HandX Value

User-inserted image

User-inserted image

I will test again the plugins more deeper today night and i will tell you if i will find another errors.

BUT until now - REALLY COOL! Specialy the second Camera!

THANX, THANX!

Boris