
riledo
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.
A3) It's EZ_B.EZ_B
have you seen http://www.mathworks.com/help/techdoc/matlab_external/brpcay8-1.html#brtk59p-1
The link you provided is what I was doing, I will confirm dependencies and get that working.
Is the header file protected or available?
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...
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.
Document your findings to share with other using Matlab it you have time. Itd probably make a great instructable
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.
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.