Award
Congratulations JustinRatliff, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

Integrating Ez-builder Windows With C Or Visual Basic Routines

Assistance Requested

Help mstephens_42 with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

mstephens_42 claims to have checked these sources:
 
#1

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 EZ-Builder 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?

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.


Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


#2

The EZ-B can be accessed via a TCP port. EZ-Builder 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 EZ-Builder The EZ-B can send and receive serial communication, I2C, digital and Analog which can be acted upon with EZ-Builder and/or the SDK.

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

The application can process what it needs to process and then send this data to an EZ-Builder variable. EZ-Builder 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.

#3

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: http://www.ez-robot.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 http://www.ez-robot.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 EZ-Builder, otherwise use the SDK - which you can download from the Software section

#4

@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, EZ-Builder now has a serial interface to connect to PC serial ports, so with the standard EZ-Builder 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.

#5

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 EZ builder have any easy way to do that?

#6

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))

#7

Yep, everything you have mentioned can be done by EZ-Builder 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 EZ-Builder using the sdk.

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

#8

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

#9

Zebra Stripes - Yes we will be glad to collaborate.

#10

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