05-10-2006 10:19 AM
05-10-2006 10:35 AM
03-16-2023 06:43 PM
responses to threads like this one would've been helpful
sometimes you can't use VISA!
so what then?
03-17-2023 02:16 AM - edited 03-17-2023 02:29 AM
@3d0g wrote:
sometimes you can't use VISA!
so what then?
You learn a LOT about C programming and head over to the Microsoft site and learn how the Win APIs in question work and then look at the LabVIEW example of how to pass various data types through the Call Library Node.
If you have a specific problem with a specific parameter dstatype you create a small VI showing the function in question, with the Call Library correctly configured for the other parameters, backsave it several versions and attach it to a post on here that you make. Or chances are very high that if you search on here you will actually find a similar problem with an answer or two from me and others, that explains the solution already. And yes those answers are highly technical and not always suited for someone without already some good base knowledge about C datatypes and C memory management and such.
DLL calling uses C syntax and principles and while the Call Library Node gives you the ability to call DLLs it can not take away the need to understand C programming details. If you insist on using it you must be willing to invest in learning these things too.
PS: The answer you reacted on for sure was meant as helpful remainder that there is VISA and that in most cases that is already enough to do serial communication. The OP did not specify why he feels that he needs to call this Windows API and there are many posts on here where users ask for a complicated solution because they do not yet know that LabVIEW comes with that specific functionality already out of the box.
If the OP really had felt that they need this complicated solution they could always have responded and explained why they feel that VISA did not work for them.But they didn’t so the answer was probably enough or they lost interest.
The functionality of SetCommState for the parameters they mentioned for sure can be controlled through VISA!