Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Potentiostat with DAQ Assistant

I'm new to LabVIEW and have to create a VI that would be able to run a Pine Bipotentiostat AFCBP1 within set input parameters. It runs through a PCI-MIO-16E-4 card. I created a VI (which is attached), but I keep getting error -200077 when I try to input potential parameters. Any help and/or suggestions of how to fix my VI or which way I would have to reprogram this to control the machine. Thank you

0 Kudos
Message 1 of 11
(5,590 Views)

Hello iibtc,

 

I am unable to replicate this error, which input parameters are you using.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 11
(5,579 Views)

The error occurs when I run the program. It records one value in the array then displays the error that I have attached in the picture.

 

The input parameters I am using are the 40 for 40 sweeps, the 220 for number of measurements per sweep, then the iteration number of the loop is used to increment or decrement the value of the next potential value that is to be tested, which is then sent to the DAQ (and in theory the machine). The next DAQ Assistant task is supposed to collect a reading of the Current for that potential.

0 Kudos
Message 3 of 11
(5,561 Views)

one of the outputs of the case statement above is zero the other a value determined by the case structure.

The first time 0 and 500. Is 500 a correct value to be output?

greetings from the Netherlands
0 Kudos
Message 4 of 11
(5,548 Views)

Yes, the cycle is supposed to start at an input of 500mV then decrease in 5mV increments until it reaches -600mV at loop iteration 110. Then it reverses and cycles back from -600 to 500 at 5mV. When it reaches 500mV again, that ends one of the 40 loops.

0 Kudos
Message 5 of 11
(5,545 Views)

I don't see the 500 change into 0.5 so understandable that there is an error when real hardware is involved.

And why do you offer two voltages to two channels instead of one voltage to one channel?

greetings from the Netherlands
0 Kudos
Message 6 of 11
(5,537 Views)

Your case statement is just wrong. Both cases need to be wired to the same exit tunnel. Your XY Graph is also getting reset with each iteration. When you select Properties, the 'Clear data one each call' is checked.

0 Kudos
Message 7 of 11
(5,533 Views)

The 500 is in the case. It takes the iteration of the loop (such as 0 to start), multiplies that by 5 for the step, then subtracts that value from 500 until it gets to -600, then does the opposite to go back up to 500 (in the False part of the case). Since the input in the DAQ is supposed to be giving the machine values in mV should I have all those numbers on the milli level (such as giving 0.500 instead of 500)?

I did change the iternation numbers for the inner For loop because I realized my calculations were off.

 

And I am confused as to where the two voltages to the two channels are? I was trying to input a potential and read a voltage.

 

I might be completely off with my attempt. The potentiostat is supposed to create a varying potential at an electrode then read the voltage between the electrode and a counter electrode at each potential. Can I use a DAQ like the first one to just give it a number and have the machine make that number the potential or do I have to do it a completely different way than I have?

 

Thanks for all of the help so far.

0 Kudos
Message 8 of 11
(5,526 Views)

It's really quite basic. You have a case statement that outputs 2 values. Either a 0 and a calculated value or the claculated value and 0. What do you think the Merge Signals function is doing except taking those two separate values and passing them to the DAQ Assistant as if you were trying to control two different analog outputs? I can't make it any clearer than you should wire both calulated values to the same exit tunnel. There should be one and only one wire coming from the case statement. DO NOT use the Merge Signals function anywhere near the case statement.

 

This is also another example how the evil Dynamic Data type can mask truly illogical applications.

0 Kudos
Message 9 of 11
(5,523 Views)

I had wired the two to the same exit tunnel and unchecked that box in the XY Graph but was still confused by the error. I realized that I did have to make the numbers in milli (500->.5). However, when I run it now I get an error saying that the value passed is greater than the max set (it says I passed .505 and the max is .5). I lowered the loop iterations by 1 just in case but that did nothing. If I raise the max by 5, it says that it goes over the max and shows that I passed a value of .510. I don't understand where in the case the value is being incrimented because all it is supposed to do is take the iteration, multiply it by .005 (for the step-up), the subtract that from .5. Can someone see where it's adding it? Thanks again. Sorry I can't figure this out.

 

VI attached

0 Kudos
Message 10 of 11
(5,511 Views)