Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Software Question (.Net, Com, Sdk Etc.)

I am using the ez_b SDK with matlab, and trying several methods. Here are a couple questions based on my attempts:

Q1) I used the the windows SDK gacutil to load the ez_b.dll into the .net Global Assembly Cache (GAC), which it did. But when I tried to load the ez_b assembly I got this message:

"Could not load file or assembly 'EZ_B, Version=2012.4.15.0, Culture=neutral, PublicKeyToken=839146fd54f35ea1' or one of its dependencies. The system cannot find the file specified.
Source: mscorlib"

I am thinking it may be a dependency, as it shows the Ez_B version and info. I see two other DLL files in your SDK where the Ez_B dll is, could those be dependencies? Is the ez_b.dll fully standalone? Any ideas? Maybe I just need to move the dll file....

Q2) I am thinking I could do this a second way, and load the shared ez_b.dll library. To do that I would need the header .h file.
Is that available?

Q3) If I want to run EZ_B as a Component Object Model (COM) server or ActiveX, I need to know the programmatic identifier. For example, when I want to start a COM server for Excel, I type this:
e = actxserver ('Excel.Application').
Does EZ_B have a programmatic ID for COM? (I tried ez_b.application...)

If I can't get these to work, then I will do serial over the Bluetooth com port, but getting the interface to work would be nice.

Note: I am working with "jschreven" on this project, who has posted elsewhere in this forum related to this ("Is The Ez-b Windows Aware?").

Thanks in advance for pointers.

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
#2  
Thanks for the identifier, I almost tried that...

The link you provided is what I was doing, I will confirm dependencies and get that working.

Is the header file protected or available?
PRO
Synthiam
#3  
i don't have a header file. the closest you'll find is the SDK Manual. the EZ-SDK is an open library, meaning every method is public and available. the dll is a .Net assembly or COM component and therefore doesn't have a header file.
#4  
I think I know why I was having trouble with your SDK and Matlab. I am running 64bit matlab on a 64 bit windows 7 PC, but the ez_b.dll SDK is 32 bit, thus the problem loading, as a 64 bit process (matlab) can only load 64-bit DLLs.

On the EZ-B download page, it says: "Developer EZ-SDK .Net Win32/64." The ARC works great on Windows 7 64 bit.

Is there a 64bit version of the SDK?

I ran corflags on ez_b.dll and got:

Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 11
ILONLY : 1
32BIT : 1 <--- the "1" means 32bit.
Signed : 1

I am currently installing a 32bit matlab on windows 7 64 bit to see if that will get it working as the 32 bit process should call the 32 bit dll. I will update with results.

I read elsewhere that you compile your software on a Windows 7 64 bit OS:
http://www.ez-robot.com/Community/Forum/posts.aspx?threadId=62

I believe VS2010 defaults to X86, e.g. 32-bit. Have you tried making a 64-bit SDK?

Thanks...
PRO
Synthiam
#5  
EZ-SDK won't be 64 bit because it's slower than 32 bit
#6  
Ok, don't want slow...

Knowing my 32/64 bit issues, I have now loaded the 32 bit .net assembly in 32 bit Matlab on my 64 Win 7 PC, and am seeing all the classes. Now, to sort out the commands I need...

Thanks.
PRO
Synthiam
#7  
Dude fantastic!

Document your findings to share with other using Matlab it you have time. Itd probably make a great instructable:)
#8  
I have made some progress, but found a typo and have a couple questions:

1) SDK manual shows the following for "Servo"

Field:EZ_B.Servo.SERVO_SPEED_FASTEST
- The slowest speed for a servo (0) <--- typo, change "slowest" to "fastest"

Field:EZ_B.Servo.SERVO_SPEED_SLOWEST
- The slowest speed for a servo (255)

2) ARC has the speed slider go from 0 (fastest) to 10 (slowest).

Is the limit for slowest 10 (value shown in ARC) or 255 (value shown in SDK)?

3) When I look at the properties for servo in Matlab (loading the .net assembly), I see this:

Properties:
SERVO_SPEED_FASTEST: 0
SERVO_SPEED_SLOWEST: 10
SERVO_MAX: 100
SERVO_CENTER: 50
SERVO_MIN: 1
SERVO_OFF: 0

which are defined as Fields in the SDK, these values are different than the defaults shown in the SDK documentation, is this due to the recent firmware update? If so, probably should update the SDK doc.

4) Not sure about the "SERVO_OFF" field, the SDK says:

"Field:EZ_B.Servo.SERVO_OFF
- The value of a servo to disable"

It is just not clear what you mean by "value of a servo." Disable the servo at, for example, position 75? Disable means?

I am very close to making things work, I am "set"ing positions and can "get" positions but the servo is not moving, making me think I have the default speed to zero or somehow I have disabled my servo (but it works great in the ARC, so I know things work...).

thanks.
#9  
It appears I have the .NET working in Matlab nicely, all but actually making the servo move. Communication is working, as I can connect and disconnect etc.

So right now I am turning on the EZ-B server and using the TCPIP interface from Matlab to control the servos, which works just fine, until I can sort out my .NET issue with movement to then give me 100% control of EZ-B from Matlab, which would be awesome.