I have just received an USB-6008 and saw this function used in a NI example, but can not find a function description anywhere on the included CD or this site or using Google. Can anyone provide that?
NIDAQmx_NewPhysChanAOCtrl
sunshinecomm.h & sunconfig.h , where will i get the this header file ?
Hi ,
i am unable to find out below files
1. sunshinecomm.h
2. sunconfig.h.
Please help me , above two files where can i find them ?
Thanks
Mukesh
In CVI2013 'portable projects' need a rebuild
Hello,
although the below reported bug may be covered by bug id 433769 this may not be obvious so I wanted to share it with you in case you were venturous enough to upgrade to CVI2013...
I work on the same project on two different computers and thus transfer all related files back and forth, i.e. the *.c, *.h, *.ico, *.uir, *.prj and *.cws files. In the past this was working more or less ok, with CVI2013 it fails: if you have a newer UIR file CVI2013 will not use it but the one in the CVI build folder... so one has to use the 'rebuild' menu command, the standard 'build' button is not sufficient, you will see the old UI...
How to split source file without loosing tags
Hello,
I am wondering how I could split my source file into two (or more) without loosing the tags...
Activate selective compîle with Build command
Hello,
I'm migrating a project from CVI 8.1 to 2013 and build process is very long because all files and instruments are recompile, even if not modified.
As I've a big component stabilized, not changin now, I loose lots of time.
With version 8.1, excepted on Rebuild All command, only modified files were recompiled.
How can I reach back this operation mode?
Problems with threads
Hi
we are using CVI 2012 and we use several threads in our application. Normally our application is running in a good way but from time to time we have a problem that a thread make our main application run slower. That means, for example, we have one thread which saves a picture to the hard disc. This is normally running fine but from time to time we see that the application nearly stops for a moment.
This is not normal. Normally a thread runs independent from the main application
To see when a thread is running and how long it needs we use a time function. That means, we the thread starts we get the current time and also we it stopps we get the time.
Start = Timer();
End = Timer();
Diff = End - Start;
Could this be a problem?
thanks
Oliver
GetCtrlVal
Hello,
I have used GetCtrlVal command at different part of my program without any problems. But now I have problems.
First when I add a BINARYSWITCH and trry to run the program. It gives me the error message
"Undeclared identifier "PANEL_BINARYSWITCH_27". I have about 27 of these toggle switches in my display.
So I removed the new switch and used one that was already there as a spare. This eliminated the error msg.
Now I try to read the switch by using the command
GetCtrlVal (panelHandle, PANEL_BINARYSWITCH_27, &FSTAT)
The FSTAT is defined as an "int" everywhere in the program. The Control setting of the switch is also uses "int" for it.
Then I just want to test the value read using a printf comand or turning a LED on or off depending if the value read
is a 1 or a 0.
But the value read is always a 0 no matter how many time I toggle the switch.
Any ideas?
Using VISA to read from COM port with delay
hi, i read a couple of posts here with a same topic, but my problem not solved. i'm must to read opcode like this one (";TST;") from chip after his booting, it takes 10-15 seconds.
i wrote this code:
//15 Seconds
for(i=0;i<1500;i++)
{
viGetAttribute(ssp, VI_ATTR_ASRL_AVAIL_NUM, &num_bytes);
viRead (ssp, Databuf, num_bytes, &RTCount);
if(strlen(Databuf)>5)
{
string = strtok(Databuf, ";")
if(strcmp(string, "TST")
retrurn 1;
}
Sleep(10);
}
it works but sometimes it is not reading buffer in time or gets ("") in Databuf, and VISA gets out with error -1705something.
are VISA have attrinbutes to wait until all buffer full with data or start buffering only then it get string (";TST;")
?
dynamically allocated data socket item drops from the data socket server
Hello,
I have a data acquisition program that writes it's data to a data socket for another program to re-dsiplay it.
Seems to work well enough, but after sometime, the data acquisition program seems to disconnnect that item from the server.
Initially, the item was being dynamically created, i.e. I just used the data socket binding and enable options in the graph control to attach it to the data socket server.
I have now added the data item manually so that both programs just attach it, but it will be sometime before I know if this helps or not.
Any othe rsuggestions are appreciated.
Multithreading and partitioned shared memory
Hi All,
I'm having no success with this (simple?) multithreading problem on my core-i7 processor, using CVI 9.0 (32-bit compiler).
In the code snippets below, I have a node level structure of 5 integers, and I use 32 calls to calloc() to allocate space for 32 blocks of 128*128 (16K) nodes and store the returned pointers in an array as a global var.
Node size in bytes = 20, block size in bytes = (approx) 328KB, total allocated size in bytes = (approx) 10.5MB.
I then spawn 32 threads, each of which is passed a unique index into the "node_space" pointer_array (see code below), so each thread is manipulating (reading/writing) a separate 16K block of nodes.
It should be thread safe and scale by the number of threads because each thread is addressing a different memory block (with no overlap), but multithreading goes no faster (maybe slightly) than a single thread.
I've tried various threadpool sizes, padding nodes to 16 and 64 byte boundaries, all to no avail.
Is this a memory bandwidth problem due to the size of the arrays? Does each thread somehow load the whole 32 blocks? Any help appreciated.
struct Nodes
{
unsigned int a;
unsigned int b;
unsigned int c;
unsigned int d;
unsigned int e;
} ;
typedef struct Nodes Nodes;
typedef Nodes *Node_Ptr;
Node_Ptr node_space[32]; /* pointer array into 32 separate blocks ( loaded via individual calloc calls for each block) */
.... Thread Spawning ....
for (index = 0; index < 32; ++index)
CmtScheduleThreadPoolFunction(my_thread_pool_handle, My_Thread_Function, &index, NULL);
problem #ifndef _WIN64 into excelreport.c
I just add the source files excelreport.c from CVI2012\toolslib and i have a "duplicate case label" error detected into my files at the line 2313 and 2320.
case VAL_INTEGER: #ifndef _WIN64 case VAL_INTPTR_T: #endif errChk (GetTableCellVal (panel, control, cell, &intVal)); __caErrChk (CA_VariantSetInt (&SetValueV, intVal)); break; case VAL_UNSIGNED_INTEGER: #ifndef _WIN64 case VAL_UINTPTR_T: #endif errChk (GetTableCellVal (panel, control, cell, &uintVal)); __caErrChk (CA_VariantSetUInt (&SetValueV, uintVal)); break; case VAL_64BIT_INTEGER: #ifdef _WIN64 case VAL_INTPTR_T: #endif errChk (GetTableCellVal (panel, control, cell, &int64Val)); __caErrChk (CA_VariantSetLongLong (&SetValueV, int64Val)); break; case VAL_UNSIGNED_64BIT_INTEGER: #ifdef _WIN64 case VAL_UINTPTR_T: #endif errChk (GetTableCellVal (panel, control, cell, &uint64Val)); __caErrChk (CA_VariantSetULongLong (&SetValueV, uint64Val)); break;
the duplicate problem take it's origine from the #ifndef _WIN64, my program don't see it and return the duplicate case label error.
In what case the #ifndef or the #ifdef don't be use.
I have a 32bit computer with Win7 OS
How to Get IP Subnet Mask Programmatically
Hi, all,
for my user interface application (communicate with the control system via some external LWIP library) would be very useful know if the host network card is able (that means is properly configured) to communicate with desired IP address.
I have a idea to use GetAllTCPHostAddresses () function - and obtain the available IP host interfaces. But how to get the appropriate IP subnet mask for each interface?
Any hint will be appreciated!
Thanks,
George
VI_ERROR_RSRC_NFOUND when trying to init scope from LabWindows
I'm running an application in LabWindows/CVI 2013 where I try to initialize communication with a LT342 oscilloscope:
Result = IviScope_InitWithOptions (IviName, VI_TRUE, VI_TRUE,Simulate=0,RangeCheck=0,QueryInstrStatus=1,Cache=1", &ScopeHandle);
This call fails and retruns the error code : VI_ERROR_RSRC_NFOUND (Insufficient location information or resource not present in the system).
I've downloaded drivers and setup the device in NI Max and can communicate with the scope from NI MAX. Via the I/O Trace I can see the commands being used, but the IviScope_InitWithOptions doesn't seem to be translated to lower level functions.
Is there any linking to DLLs that needs to be done from LabWIndows/CVI?
I'm new with LabWindows/CVI so please give a hint even if it's a simple mistake that You see is the root cause for the issue...
Attached are I/O trace output with communication from NI MAX (ibxxx calls) and LW/CVI.
Best regards
JOE
Porting from CVI 2009 to CVI 2010
I have a project that I can build in CVI 2009. I've upgraded to CVI 2010, loaded my .cws project in 2010 now on every .c file I am getting a "1,1 illegal character ','". What kind of error message is that? Not very informative. I'm guessing, and I stress just guessing, it might be related to some header include order but I have no idea what with that kind of error message.
Thanks
Assigning a publisher certificate
Windows 8 expects a publisher certificate to be linked to the installed application executable of your distribution kit in order for it to be a 'trusted' program. How is this certificate created, and how is it assigned to the distribution kit install setup.exe and assigned to the application executable?
SQL script with Access: A script with a wilcard *
We are using ACCESS 2007.
I am not able to use the wildcard(*) in my script:
Exemple:
sprintf(myQRY,"SELECT tablename.col1 FROM table.name WHERE tablename.col1 Like '%s' ",mystring); mystring="aa*"
tablename.col1
aa000001
aa000002
bb000001
The result I expect is: aa00001, aa00002
I get no records: It seems that the wildcard * is not recognize. I tryied %,_ still doesn't work: When I try myQRY in ACCESS it works.
Do you have an exemple using the wildcard
Look for a project example of ActiveX server with user interface
Hello All.
I look for a CVI project example of ActiveX server with user interface, which can be used as a ActiveX control in LabVIEW, MS Office, SCADA e.t.c.
Image Control in CVI is causing General Protection error
Hi,
Image_Control in CVI is causing General Protection error while trying to discard the parent panel or executing 'ImageControl_Revert (..)' function.
Do any one know how to resolve this issue?
Thanks,
Sankar
CVI Project convertion error
When I do the convertion of CVI2010 Project in VS2008 IDE, a dialog which says "Cannot find the VXIpnp Directory." pops,how to deal with this problems? Thanks!
Recupérer les valeur d'un Control via un .obj appelé depuis une DLL- Getting a Control value from an .obj file called from a dll
Bonjour,
Suite au passage à la version CVI 2013, il faut passer par un fichier .obj au lieu du .c quand on veut utiiser la LoadExternalModule.
Le pb qui en résulte impossibilité de récupérer la valeur des control dans l'uir géré par le .obj qui est appelé par une dll.
Autrement, il m'est impossible de faire parvenir à la dll les valeur des control ( dll qui appelle le .obj).
Quelqu'un a eu le même soucis amigos?
Merci
Hi,
When using the LoadExternalModule function in CVI 2013, we can no longer use a .c file. Instead we have to use an .obj file.
My issue is that' impossible for me to get a control value from an .iur managed by the .obj witchi is called by a dll.
Otherwise it's impossible for me to get the control vale when calling the .obj from a dll.
Any suggestions Amigos
Thanks