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

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

#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.

#9  

Hi mstephens_42

My plan was to also to link the teensy to EZB4. I have not made any progress on this yet but I realise that the arduino code will need to be modified to simplify the output and send it to the EZB4 presumably by UART and a new power supply will need to provided to the teensy. I don't think any of this is hard (except for finding the time to do it!). Of course the hard thing will be to do something useful with the data when it comes into EZB4. Potentially we could do something like the radar map associated with the ultrasonic device?

I bought the lidar, motor, teensy and enclosure for the lidar from getsurreal.com. I was very impressed with the build which was very professional. I got it working quite quickly.

My other project is to use an arduino board to collect a whole bunch of sensor information which will then have to use i2c to send summary results back to the EZB4 given that the UART will be connected to the teensy ... so much to do and so little time given work and kids!

Cheers

Chris

#10  

Quote:

given that the UART will be connected to the teensy

EZ-B has 3 UARTS. The dedicated one (uart0 in software) and 4 of the digital ports:

D5 (TX) and D6 (RX) can be used as UART1 with 5kB Receive buffer

D18 (TX) and D19 (RX) can be used as UART2 with 5kB Receive buffer

Alan

#11  

Thanks Alan for that information ... that should make life easier for me ...

#12  

Alan, that's interesting about the UARTs, I didn't know that. I thought any digital ports could be setup as a UART/Serial, is that not the case? It used to be at least, right?

#13  

I have an intern working on this and he is already reprogrammed the teensy controller such that the format is easier to read. It is sending back a three data points per read ..angle, distance and quality. We can actually post the Arduino code modifications and the ARC project.

#14  

Justin It seems that all digital ports can be used to transmit serial data but not receive data. here's a blurb from the EZB(4) pdf data sheet:

(C) May 18 2014 EZ

Robot Inc. All rights reserved. The information in this document is believed to be accurate at the time of publication, however specifications are subject to change without prior notice. \Rev 0.5

Digital I/O Ports

24 Multi-Use Digital I/O ports: D0-D23

Software configurable for servos, transmit serial , output 3.3 /GND , PWM, and more.

Input Max 5 VDC TTL Logic . Output Max 3.3 VDC TTL Logic

Special functions:

D5 can control Dynamixel servos

D5 (TX) and D6 (RX) can be used as UART1 with 5kB Receive buffer

D18 (TX) and D19 (RX) can be used as UART2 with 5kB Receive buffer

#15  

Any digital can be set up to send serial. There are 3 that are setup to receive serial.

Had it backwards... right now.

#16  

Hi

Posting would be so useful for me and potentially others in the community who are following in your footsteps.

I like the idea of an intern working on the code - I wish I had the luxury of that!

Can you say more of your plans for how you will use the data when it comes into the EZB4?

Cheers

Chris