07-14-2009 09:58 PM
Gee, I completely missed the wire between the VISA Write and VISA Read. Damn old eyes. Thanks for catching that, Ravens Fan. ![]()
I don't think sending that command without sending a number is a way to query. In fact, there seems to be a different set of commands for querying, and I think the command for querying the current rate is RAT. At least, that's not how I read it in the manual.
07-14-2009 11:43 PM
As Smercurio said, take a look at the syntax for what you are trying to do with that first command, and look up in the manual for what the response should be that you are looking for in the VISA read as I don't think you have that wired up properly.
Ok, here is how i interpret it, after the program initiates the pump to RUN:
Blue Circle: Write to pump a rate value
Green: Read back the value the pump is set at and store in the buffer
Red: Dial to change pump rate and compare value to the buffer
Black: If the values are different write to the pump the new value as it appears on the dial.
syntax for what you are trying to do with that first command
so i guess this should really be checking what the pump is set at prior to my adjusting it with the dial, not writing a value as it states now
manual for what the response should be that you are looking for in the VISA read
the query RAT should work here, so does this mean i should switch the position of the VISA read and VISA write? so visa read checks the value and then stroes that as the initial in the buffer, does this mean i can delete the first VISA write (blue circle)?
07-15-2009 07:39 AM
I may be able to assist you by providing contact information for a researcher that is very experienced in setting up custom software for the GENIE Plus syringe pump. If you would like, please email me at dmiller@kentscientific.com.
Dave Miller
Kent Scientific Corporation
07-15-2009 08:58 AM
07-15-2009 09:05 AM
superomario wrote:As Smercurio said, take a look at the syntax for what you are trying to do with that first command, and look up in the manual for what the response should be that you are looking for in the VISA read as I don't think you have that wired up properly.
Ok, here is how i interpret it, after the program initiates the pump to RUN:
Blue Circle: Write to pump a rate value
OK, but the syntax doesn't match what you are doing in the black circle. Here you are writing 0 ULM <CR>. In the black circle, you are writing 0 ULM (rate) <CR>
Green: Read back the value the pump is set at and store in the buffer
When you write a new rate value to the pump, what does it send back? Does it send back 5 bytes worth of data which is how many bytes you had written out with the VISA Write? I am 99.9% sure you do not want the blue wire that connects the VISA write and VISA read. If you want to read the pump value, then you should be using the RAT command like Smercurio says.
Red: Dial to change pump rate and compare value to the buffer
OK
Black: If the values are different write to the pump the new value as it appears on the dial.
OK
syntax for what you are trying to do with that first command
so i guess this should really be checking what the pump is set at prior to my adjusting it with the dial, not writing a value as it states now
manual for what the response should be that you are looking for in the VISA read
the query RAT should work here, so does this mean i should switch the position of the VISA read and VISA write? so visa read checks the value and then stroes that as the initial in the buffer, does this mean i can delete the first VISA write (blue circle)?
No. don't switch anything. Change your initial VISA Write to RAT. Then do your VISA Read. Either read the correct number of bytes, or use set a termination character for your serial port. Then do the comparison with the dial and do the VISA Write for the new rate. When you set a rate, does the pump respond with any kind of acknowledgement? If so, you should be reading that using a VISA read.
07-15-2009 10:57 AM
@Ravens Fan - good catch on the bad wiring. Supermario is working off my example code in message 8 of this thread (I did it in about 2 minutes!).
I just want to point out, I hope I haven't caused any confusion with that example code - it was based on my knowledge of a different syringe pump. With that syringe pump (not a genie), when you send "RAT<CR>" - that functions as a query, the pump will return the current rate. When you send "RAT2<CR>" you are in fact setting the rate to a value of 2. So same "command", but different syntax, for different results.
I have not had time to read the genie manual, so I don't know if it is similar, or maybe even the same command structure.
07-15-2009 01:06 PM
07-16-2009 10:11 PM
07-16-2009 10:28 PM
Then please mark whichever post helped you the most for the solution instead of your own thank you message. (You can unmark your post from the options menu to the upper right of your post.)
When you say "chain them together", do you mean both pumps serial communications are on one port like in an RS-485 setup?
I don't think you want want to set both of them to the same address. They should each have their own address. Yes you would write them to the same serial port. Exactly which VISA write you wire the command to all depends on how you lay out your program architecture now that you are looking to expand it from a simple communication. Whatever architecture you use, you want to make sure the commands you want to send to one pump don't interfere with the commands for the second pump. You will want to write to 1, read from 1, write to 2, read from 2, repeat.
07-16-2009 10:31 PM