취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

Syringe Pump program

해결 완료!
솔루션으로 이동

Hello Everyone.

 

I am using labview to try and communicate and control New Era syringe pumps. In my code I am able to set the parameters, i.e syringe diameter, flow rate, units, etc. for 2 pumps. however my third pump will not respond to its given line of parameters. Unless I change the address in the first two lines, I am unable to set the parameters for the third pump. I can however run all three pumps. so the issue is with setting the parameters only. I have attached by code below since I am sure I might not have explained everything comprehensively or properly. If anyone has any tips, that would help me out so much.

 

Thank You In Advance

0 포인트
1/12 메시지
8,469 조회수

All the subVIs (probably the LabVIEW driver) are missing from your VI so it is a little bit to tell what is going on.

 

With serial communication, you can only have 1 device per port. It means that you should have 3 serial ports to communicate with 3 syringes. Each syringe should have its own port number.

 

Sometimes LabVIEW drivers provided by manufacturers have only a limited number of ports listed (enum with COM1 to COM3 for example). You might have to go in and check how the addresses are set within the driver and modify it if necessary.

 

Finally, I would suggest that you make a very simple VI that would only check if communication works with 3 syringes at a time. If that does not work, you can troubleshoot that VI to figure out the problem. Ultimately, you can post that VI if you cannot figure out the problem.

Marc Dubois
0 포인트
2/12 메시지
8,440 조회수

It's kind of a tangled mess, but are you SURE that pump 3 is actually pump 3 in your block diagram???  Send P3 is the third bit in your number.  If it's on it won't be a "3" in the case structure!

 

This is wrong if you want to operate all the pumps at the same time.  Let's say all the pumps are on at once.  This is 111 binary.  That's a 7 in decimal.

 

This would explain why you can't control pump 3.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 포인트
3/12 메시지
8,424 조회수

Now, about that code...

 

I'm assuming you've programmed in other, text-based languages, so I will provide analogies.

 

Lots of duplicate code:  What happens if you find yourself constantly duplicating code in a text-based language?  You move the code into a function so you can save space, and if you have to change the way that code works, you change it only in one spot.  In LabVIEW, you make a subVI so you can us it in different places.

 

Lots of wires going in all different directions, too many bends, nothing is lined up:  Besides being unfair to my OCD issues, it just makes it difficult to read.  An analogy in a text-based language would be random indents.  The compiler doesn't care, but if your fellow coder had to work on that code and then went to strangle you in your cubicle, I'd just put my headphones on max so I wouldn't have to listen to your dying gasps.  😉

 

See all those property nodes sitting out there all lonely outside the loop?  Just because they are to the right of the WHILE loop doesn't mean they execute first!  In fact, we don't really know when they are going to execute.  All we know is they will execute exactly ONCE every time you run the VI.

 

There are lots of helpful links to training on the main page of the forum.  Plus a lot of (sometimes grumpy, but always more than willing to be helpful) people who patrol this forum.  Do the training.  Ask lots of questions.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 포인트
4/12 메시지
8,416 조회수

Thought experiment: What would happen if you could press "Send P1", "Send P2", "Go P1" and "Go P2" at the same time?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 포인트
5/12 메시지
8,410 조회수

Hi Athakore

Disclosure - I make a gui program for the New Era pump family and sell it - it's called SyringePumpPro.

 

You only need a single communications port to talk to all three of your pumps. They connect in daisy chain fashion. See my FAQ on pump connectivity for diagrams of how to connect the pumps and how to set their addresses. There is a lot of info there which will help you.

 

Are all your pumps connecting and talking properly?

If your not sure - I suggest that you download my free trial - you certainly don't need to purchase anything. My software will soon tell you if your third pump is communicating correctly.

 

catch ya

timb

 

If you think I can be of help - please contact me through my website.

 

0 포인트
6/12 메시지
8,388 조회수

thanks everyone for the responses I was actually able to use a bit of each suggestion to improve my code. however when I daisy chain the pumps for some reason the last two pumps do not work. I have 12 pumps in total however it does not matter which pumps are the last two in the chain, it is always the last two regardless of address or pump location, that seem to not respond.

0 포인트
7/12 메시지
8,374 조회수

@Athakore wrote:

thanks everyone for the responses I was actually able to use a bit of each suggestion to improve my code. however when I daisy chain the pumps for some reason the last two pumps do not work. I have 12 pumps in total however it does not matter which pumps are the last two in the chain, it is always the last two regardless of address or pump location, that seem to not respond.


The units probably have a DIP switch setting that tells it if it is the last or only pump on the serial port or not.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 포인트
8/12 메시지
8,364 조회수
솔루션
승인자 Athakore

There's no dip switches anywhere. 기쁨 이모티콘

 

It's very likely you have a broken wire - if your sure that all your pumps have unique addresses. Try swapping the cable connecting the first dead pump with the cable connecting the last live pump - to computer side - I am talking about. If the last three pumps wont talk - you found your problem.

 

timb

9/12 메시지
8,359 조회수

 Thank You, this was in fact a similar problem to what you said. seems like the network port on one of the pumps was broken and therefore all the pumps following it in the daisy chain were not able to receive any signals or connect.

0 포인트
10/12 메시지
8,343 조회수