Alexander Kocian
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by Alexander Kocian
-
-
thank you. The code is now working perfectly.
-
Ned, your method works. Only the declaration int I had to change against __int64. thank you. Now, I understand how Labview stores clusters.
rolfk, my VisualC compiler says that the syntax MgErr is unknown.Do I need to consider a special library?
-
Thank you for giving me feedback. Creating C-File by Call Library Function Node gives
Quote/* Call Library source file */
#include "extcode.h"
void pointertest(void source[]);
void pointertest(void source[])
{/* Insert code here */
}
Therefore Labview also crashed when I change the function prototype from
Quotevoid pointertest(LVCluster *source)
to
Quotevoid pointertest(double *source)
Once this simple example works, the task will be to bundle a complex combination of data types.
-
The task is to process a bundle by a DLL embedded in LABVIEW. LABVIEW crashes even if the coded is most simple.
For example, I created an array of double, bundled it and plugged it into the DLL. The parameters of the DLL are "Adapt to Type". The prototype in Labview is "void pointertest(void *source);"
The C program:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include "Header.h"
extern "C" __declspec(dllexport)void pointertest(LVCluster *source);BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
void pointertest(LVCluster *source) {
source->dimSize = 2;
source->arg[0] = 3.1;
source->arg[1] = 4.2;
}The header: Header.h
#pragma pack(push,1)
typedef struct {
__int64 dimSize;
double arg[2];
}LVCluster;
#pragma pack(pop)The LABVIEW VI is attached. I checked the foren. However, I cannot figure out what I did wrong. Please give me a hint.
Your support is highly appreciated.
LABVIEW on real-time platform RTX64
in LabVIEW General
Posted · Edited by Alexander Kocian
Hello
Currently, I stream and proecess audio (for medical purposes) on my PC (i7-4790T with 8 cores) using LABVIEW 2013. To improve performance, the 8 cores could be shared between MS Windows and the real-time operating system RTX by IntervalZero.
Please, how can I tell LABVIEW to use the (deterministic) RTX cores instead of the (stochastic) MS Windows cores, to stream audio?