10-03-2008 12:19 AM
Has anyone experience using the SeaLevel #5102 Synchronous Serial Port with LabVIEW? My customer sent me one that we are supposed to use on a project and all its documentation talks about are calls to the Win32 API with some function prototype type descriptions, i.e. opening the port is by a "CreateFile"
HANDLE hDevice
;
hDevice
= CreateFile(
"\\\\.\\SeaMAC0", //
open SeaMAC unit 0
GENERIC_READ | GENERIC_WRITE, //
open for sending and receiving
0, // do not
share
NULL, //
no security
OPEN_EXISTING, //
device exists
FILE_ATTRIBUTE_NORMAL, //
normal access
NULL); //
no attr. template
if (hDevice == INVALID_HANDLE_VALUE)
{
ErrorHandler("Could not open SeaMAC device"); // process error
}
Thanks,

10-03-2008 09:07 AM
Hi Putnam,
We use the Sealevel cards, and we use LabVIEW, but I'm not going to be able to help you much. A previous programmer here wrote some C code that handled the SeaMac devices directly and wrote the data to a file, then the LabVIEWprogram just reads the file. Not the most elegant solution, but it works in our case.
The main reason I even bothered to bring it up is because we recently started a project to rework this code, and the programmer doing it has been given the option of doing it in C or LabVIEW - preferably LabVIEW if he can find a way to get adequate performance. So we may have some info to share with you in the future, or maybe we'll be bugging you to see what you have found in the meantime!
Cheers,
Dave
10-03-2008 09:41 AM

10-09-2008 06:52 PM
Hello Putnam,
I am Darren Odom- the engineer that Dave mentioned above. I am curious if you found the white paper/LabVIEW examples and if so, could forward them to me?
I would appreciate any help that you can give on the subject.
Thanks,
Darren Odom
SureWorks, LLc.
Darren.Odom@sureworksllc.com
www.sureworksllc.com
10-17-2008 10:15 PM
Hello all,
I have just started working on the #5102 card. I am also curios if anyone was able to get their hands on the white paper/LabVIEW examples from sealevel.com? If so, would you kindly send me the files as well? You may be able to attach them to this post, or via email at felghussein@wabtec.com.
I have tried contacting sealevel so many times, but either they have a really bad customer service, or they are in the midst of quite a bit of changes. Either way, they have never replied to my emails or voice messages.
12-05-2008 06:12 AM - edited 12-05-2008 06:15 AM
Here we are, months later, and I am only now revisiting the issue of using the 5102. I was sent their "whitepaper" as well as an example. Unfortunately the example wasn't the one shown in the whitepaper, and in fact was both incomplete and broken, looked like it was probably an earlier attempt before the whitepaper's version. My urgency in finishing this part is that the group developing the UUT's side test software has finally finished their synch port driver and now expects me to test it. The nerve!
It turns out that you have to use their (SeaLevel) older SEAMAC v3.x version, which installs a dll. It is on their newer CD (which will install 4.x by default) as is the documentation for their API. I've attached the white paper, the example they sent and dll. I am also sending my latest attempt at a port open, write, read, close. The open and close work without any errors returned, but I haven't got the write to work. I suspect that the example they sent, where they wire a string to the "write" dll input may be incorrect, based on my looking at the appropriate dll call's description in the help file (attached). In the folder Synch Comm the test.vi was my last attempt last night. It returns a "buffer" error code. The vi "errors" lists the returned error codes, not much explanation as to what causes them though.
Sorry for the large attachement, I'm under the gun and throwing everything at it. Also there have been a number of requests here for much of the included information. Sorry for the delay, I too had some difficulties with SeaLevel's apparently over worked staff. They are very friendly, and try to be helpful, but their whitepaper looks like it was done in the 2001 timeframe with LabVIEW 6 or so (and an evaluation copy at that) so I don't think they have LabVIEW knowledge in depth. Their latest API uses the Win API model, but having no dll I am clueless how, with out writing some C++ code, to interface to it. If I can't get this working soon the UUT group is going to write an executable that I will call, which doesn't sound clean and elegant.

12-05-2008 06:23 AM
