I have a DLL I created (in Labview) that takes in string information, does some magic crunching on it to create a password that is passed out as a string. This DLL will be called from CVI and probably from a C# application.
This should be so simple, however I cannot figure out how to pass the string in and get the modified string out of my DLL.
I've had no luck at all getting this DLL to work by trying many different things. It crashes LV, returns and error, or simply passes nothing out during my trials.
I've included the project (its small) in zipped format. Can one of you kind souls take a look at my code and tell me what I'm doing wrong, or what I need to do correctly to both, configure the DLL and then call it from LabVIEW?
As far as I now there is 2 way to define how to format a numeric into a string using the floating point representation (%f):
- Setting the number of significant digits (%_2f)
- Setting the number of digits or precision (%.2f)
However I often find myself in the need of a way to define the width of the string. For example I always want 3 digits maximum. Using significant digits won't work if the number is 0.0012 since this only has 2 significant digits, so the string will be 0.0012 even though I would like to see 0.00 (so 0 if we hide trailing zeros).
On the other hand, using digits of precision won't work if I have a number like 123.45 since it has 2 digits of precision, so the string will be 123.45 even though I would like to see 123.
Now the obvious brutal way would be to use a string subset and only keep the first 3 digits (I guarantee that my number is never bigger than 999). But I really hope there is a more elegant way. I can't imagine that nobody has run into this requirement before. How did you tackle it?
I am able to read HEX file into Labview using read from Text file..I am getting data into labview in terms of string.
Problem => Now i want to load this HEX file into microcontroller using VISA-rs232 .Is it require to further conversion or i can load HEX file(in form of string) directly into microcontroller ?
I need a little help.
I want to send from LabVIEW to Arduino via serial port the string for example "ABC" and so on.
The problem is that when I send the string from LabVIEW .......the Arduino do nothing. Sometimes shows some kind of sign.
When I send the string via Visual Studio it works perfectly.
Is there someone who can help me.
I attached picture of vi and Arduino code
Thank you very much.
I write here a topic, because I'm looking for a help since I can not deal with some issue for a long time. I'm trying to write LabView program which will program uC flash using JTAG usbWiggler manufactured by Macraigor Systems. The manufacturer provides customers with program to do whole staff connected with programming, but it's stand alone app and I would like to build the programming process into the test sequence performed by LabView (program + test). Additionally the manufacturer provides a library to call various functions related to programming, erasing etc. I tried to write a program to use dll but no success. There is some small cmd exe program which is using the dll (also created by the supplier), and its working, but there are some bugs in it, and I cannot change it or make some error handling so that's why I decided to use dll alone. I attached dll, dll readme file, ocd file (configuration file for uC), and VIs.
I checked the first command called: "FlashSetupAndConnect" it's working without hardware, so you are able to test something. (checked with cmd exe program, without device it always pass if input data is ok, it fails when something is missing like bad path file etc.) Status from each function should be "1", and I get "0" all the time.
The function should looks like this (copied from readme file):
int FlashProgrammer_SetupAndConnect(char *ocd_filename, char *device_name, char *device_address, unsigned long baud_rate,
unsigned long jtag_speed);
I will be very grateful for any answer and advices.