11-03-2015 09:36 AM
OK, let me tell something new. Now, it runs properly the drivers from the german website. It seems that I have to set the instrument in remote control via command RT,ON and then try run any LabVIEW driver. But it still can't run your components. I hope that I can do what I want with the german drives.
To conclude, I want to control the setpoints for both channels in relation to specified time stamps and read back the flow (for check).
11-03-2015 09:44 AM - edited 11-03-2015 09:46 AM
You still did not answer, whether you tried to use my lvlib in a way as I showed in the snippet in my previous post. Did you try exactly what I have showed? Do you see any error code? My lvlib only uses the drivers which you should have already installed in your instr.lib folder under your LabVIEW installation. This driver is inside the zip file which I have posted previously.
So, did you try the above steps? Can you show your own VI, how you try to use my example? (Init device, Read actual flow value, close device comm).
So did you try exactly this snippet after properly unzipping the driver under your "instr.lib" folder?
11-03-2015 10:22 AM
Yes, I did exactly what you did in your snapshot. It shows no error but it doesn't read the value. It's strange since I also have noticed that your library is based at the components of the german website. I unzipped your library in the proper destination (instr.lib) inside a different folder from the library of the german website. I will post tomorrow the snapshots to make yu sure about that.
11-04-2015 05:36 AM
11-04-2015 06:31 AM
11-04-2015 06:53 AM - edited 11-04-2015 06:55 AM
OK, I am happy to say that I have figured out what's happening. I solved it.
I had set the instrument's parity=NONE because that's what BZajec wrote in the first page. But your vis and the german website's vis run with parity=ODD. So setting my instrument's parity manually to ODD, solves all problems. It's working fine now!!
Also, I have figured out that I have to run the initialize vi firstly in order to proceed with the other vis. I didn't expect that, I was expecting all the vis had a sub vi for initialize.
Thank you Blokk for your assistance. I would like to ask you why you made your vis? Didn't the german website's were practical?
11-04-2015 07:07 AM - edited 11-04-2015 07:20 AM
I told you, you must use the "initialize VI" first! 😛
Anyway, I am happy it works now, you see, I was sure this model must work 😉
And why I made my VIs? Have a look at them. They wrap the device VISA references inside a Functional Global Variable. So I have a more tidy block diagram when I use these VIs, no ref wires going through my MAIN block diagram... 🙂 And some other benefits...
This is something which I have learned in this forum between many other useful things. Beside never ever trust any "official driver", often they are not only impractical, but may contain bugs!
http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/td-p/503801
"Wrap it up":
11-04-2015 07:26 AM - edited 11-04-2015 07:28 AM
Thank you again for your support. As for why I wrote yesterday that the german vis ran and yours not, maybe it is because I can control the parity easily in the front panel and I put it to NONE, something that I had to dig more inside your code to control.
When I manage to complete my vi, I will post it to help anyone who wants to control the pr4000's setpoint according to predetermined time periods.
11-04-2015 07:45 AM - edited 11-04-2015 07:46 AM
Why do not you just use the default settings on your PR4000?
It works for me without any problem, with my own VIs.
Actually my VIs just use the official driver, in a more compact way, as I already noted.
Below is what my Initialize VI uses, just the default settings of the driver Init VI.
Just being curious: what if you set your hardware according to this? Does it work then?
11-04-2015 09:30 AM - edited 11-04-2015 09:33 AM
Yes of course it works if I adjust the instrument according to the settings of the VI. The problem was that the instrument had parity=NONE and the VI had parity=ODD. It works either if I change the instrument's parity (manually), or if I change the parity of the VI to the instrument's. I''ll keep parity=ODD as it's the setting that the manual suggests for RS232.