Asked — Edited
Resolved Resolved by JustinRatliff!

Integrating ARC Windows With C Or Visual Basic Routines

We are looking to find out if the EZ-Robot platform can be used to read and act on data streams from a laboratory grade light meter and a LIDAR. Basically, we expect a string of data from the light meter that would have to be parsed and acted upon.

I envision that we would need to write a routine in C or Visual basic that would poll the meter and receive the string, parse and communicate that information. I have not done this before in EZ builder. Can I run ARC with specific "canned" modules running while also running a C or VB routine that would do a function that is too advanced for scripting?

Does anyone have some examples of code we could review where an external program is called and run from EZ-B?


ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

#1  

The EZ-B can be accessed via a TCP port. ARC can also be used to connect to the EZ-B and can be accessed via a TCP port. The SDK can be used (.net languages) to communicate with ARC The EZ-B can send and receive serial communication, I2C, digital and Analog which can be acted upon with ARC and/or the SDK.

Yes, ARC can run scripts while an application is communicating with ARC. It is very multi-threaded. There are many examples in the SDK of how to communicate with ARC from an external application.

The application can process what it needs to process and then send this data to an ARC variable. ARC can be running a script that will look for a change in the variable and act on that change to the variable. This can be running in a loop so that when the variable changes again, an action can be performed.

PRO
Synthiam
#2  
  1. You can use the Lidar by pressing a few mouse buttons and not even needing to code anything, if you don't want to. Just follow this link: https://synthiam.com/Tutorials/Help.aspx?id=215

  2. a light meter will most likely connect to the ADC ports. So that's really easy as well. Simply view the data with https://synthiam.com/Tutorials/Help.aspx?id=30 (there are a few adc ports so you can choose one that you like). Also scripting you can simply receive the ADC value with 10 bit adc using the script commands

What would you want to run an external program for? It can most likely be done in ARC, otherwise use the SDK - which you can download from the Software section

#3  

@mstephens_42, when you say "laboratory grade" I'm not sure what sort of outputs it has. DJ answered your questions pretty well, my only added comment would be depending on what type of equipment you have, the primary method of output might be a serial interface, in which case the EZBv4 does have a UART serial interface you could use as well.

Or if your equipment already connects to a PC via a serial port, ARC now has a serial interface to connect to PC serial ports, so with the standard ARC software with a few clicks you should be able to interface with it rather than making something with the SDK.

If you get stuck if you can post links to the devices you have, we can take a look at the manuals online (assuming they have some) and help you further.

#4  

We are starting with the xV-11 Lidar and a controller from gets unreal. The xv-11 can return any angle with distance up to 10 ft indoors. We would like 360 positional data of the robot.

http://www.getsurreal.com/product/xv-lidar-controller-v1-2

This would be a great new sensor control for DJ to add!

Also, we want to write the data from robot to a csv file for reviewing data in excel after running a test. Does ARC have any easy way to do that?

#5  

You can write data to a file, is from the EZ-Script manual from the learn section:

FileWrite( filename, contents )

     Appends text to the specified file. This does not append a new line.

     Example: FileWrite(c:\temp\mylog.txt, My Variable: + $x)

     Example: FileWrite(c:\temp\mylog.txt, servo Position: GetServo(d2))

FileWriteLine( filename, contents )

     Appends text as a new line to the specified file.

     Example: FileWriteLine(c:\temp\mylog.txt, My Variable: + $x)

     Example: FileWriteLine(c:\temp\mylog.txt, servo Position: GetServo(d2))
#6  

Yep, everything you have mentioned can be done by ARC without any programming. There will be some scripting.

If you need to have separate code fore something else, it is also easy to communicate with ARC using the sdk.

This is the solution you are looking for and I would think your solution could be up and running really quickly.

#7  

Hi mstephens_42

I just got the same Lidar and Teensy controller from getsurreal.com as well so I am a little bit behind you in making progress ... please can you share information with the community as you sort out the answers?

Cheers

Chris

#8  

Zebra Stripes - Yes we will be glad to collaborate.