Home Articles Downloads Forum Products Services EBME Expo Contact
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 7 1 2 3 4 5 6 7
Joined: Feb 2004
Posts: 14,654
Likes: 60
Super Hero
Offline
Super Hero
Joined: Feb 2004
Posts: 14,654
Likes: 60

There is a lot of nice information in the (old) .pdf linked to earlier.

Originally Posted By: Geoff Hannis

I can't comment further as I don't have to hand the protocol document mentioned.


I've got it now! smile

Joined: May 2013
Posts: 4
Newbie
Offline
Newbie
Joined: May 2013
Posts: 4
Hi all,

It's very hard to find others who are also trying to connect a PC to an Alaris Asena pump, so I'm glad that I found this thread. I'm currently trying to use the Alaris Asena communications protocol for an experiment for my masters thesis, but since the code for calculating the CRC is in C++ (and my C++ programming skills are non-existent) it's difficult for me to use. I was wondering if anyone has converted the C++ code to another programming language, like Java of Matlab code and is willing to share it with me? Many thanks in advance!

Regards,
Frank

Joined: Feb 2004
Posts: 14,654
Likes: 60
Super Hero
Offline
Super Hero
Joined: Feb 2004
Posts: 14,654
Likes: 60

Welcome to the forum, Frank. smile

Take my tip:- seize this opportunity to learn C. You'll be glad you did.

By the way, it looks like that link I gave earlier was no good. frown

You could make a start by typing the example code into your favourite C compiler and take things from there. In my experience, by following that kind of approach you will learn far more than you ever would have in a classroom!

As you must know, the name Rocksoft comes up time and time again when looking at CRC stuff - so (as we like to say on here):- remember that Google is your friend! So here is the famous (as in "oft mentioned") CRC V3.txt* file. whistle

There is a lot of stuff on Google about CRC coding in Matlab; so maybe you could adapt code for your purposes from one or more of those. Anyway, be sure to let us know how you get on.

But, as you mentioned Java, take a look at this.

Lastly (as I don't have an Asena syringe pump available to me these days), can you confirm that a "straight" 9-pin serial cable is the one required?

* You will find some C stuff in there, as well.

Joined: Jun 2000
Posts: 2,410
Likes: 12
Huw Offline
Hero
Offline
Hero
Joined: Jun 2000
Posts: 2,410
Likes: 12
Originally Posted By: Geoff Hannis
Take my tip:- seize this opportunity to learn C. You'll be glad you did.
C++ is O.O. C is not. smile

Joined: Feb 2004
Posts: 14,654
Likes: 60
Super Hero
Offline
Super Hero
Joined: Feb 2004
Posts: 14,654
Likes: 60

Yes. But look at the examples I mention.

And ... you have to start somewhere! smile


If you don't inspect ... don't expect.
Joined: May 2013
Posts: 4
Newbie
Offline
Newbie
Joined: May 2013
Posts: 4
Thanks for the input everybody! Luckily, mmartinez had the CRC code in Java and was kind enough to send it to me(thanks again!).

@Geoff Hannis: For connecting to the Alaris Asena pumps you indeed need a 9-pin serial cable.

Joined: May 2013
Posts: 6
Newbie
Offline
Newbie
Joined: May 2013
Posts: 6
Thanks all for the answers!!! anyone knows how is composed the communication security code needed to comand the pump?

Thanks

Joined: May 2013
Posts: 4
Newbie
Offline
Newbie
Joined: May 2013
Posts: 4
The security code is calculated by the CRC function (there's a C++ code fragment in the communications protocol at http://www.frankshospitalworkshop.com/eq...vice_manual.pdf, page 129-131) which takes the serial number of the pump and the length of the serial number as arguments and it returns a 4-digit code. Those 4 digits are the security code that you need. Be sure to "ask" the serial number from the pump, because internally the serial number may have a dash "-" in it, which (in my case) was not mentioned on the label on the pump itself, but it makes a difference in the code that you get returned! Good luck!

Joined: Feb 2004
Posts: 14,654
Likes: 60
Super Hero
Offline
Super Hero
Joined: Feb 2004
Posts: 14,654
Likes: 60

Those four digits of the Security Code are not digits as such, but rather four hexadecimal characters (ie, 0-9 and A-F) representing a 16-bit CRC value. The code example describes this as the high and low bytes of the Security Code.

Hopefully the serial number is correctly displayed at the pump's Self-Test Procedure (123) and (or) the Information Logs (376)? think

According to the manual, Asena serial numbers are in the form:-

9999-99999

I haven't had a play with the code mentioned yet (but maybe I'll type it in when I have a bit of time), but assuming an equipment serial number of 1234-56789 it looks like it needs arguments as follows:-

func(1234-56789,10)

... where 10 is the length of the serial number. smile

Joined: May 2013
Posts: 6
Newbie
Offline
Newbie
Joined: May 2013
Posts: 6
Thank you all for the help...just one more thing...i have a labview code to ask the serial number from the pump but i cant have any response...i think its because the response time of the pump...can anyone give me some ideas of where is the problem? if needed i send the labiew code...By the way, i am using a rs232 to usb cable, it works in this case, or i need to use a pure rs232 cable?

Page 2 of 7 1 2 3 4 5 6 7

Moderated by  DaveC in Oz, RoJo 

Link Copied to Clipboard
Who's Online Now
1 members (daisizhou), 685 guests, and 509 robots.
Key: Admin, Global Mod, Mod
Newest Members
MDevins, EmsR16, Fergusben1, Guilherme Gomes, Salvatore
10,173 Registered Users
Forum Statistics
Forums25
Topics11,055
Posts73,707
Members10,173
Most Online5,980
Jan 29th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.5