02-29-2008 11:07 AM
03-11-2008 10:50 AM
03-12-2008 02:46 AM - edited 03-12-2008 02:47 AM
Indeed 🙂
@bi wrote:
Thank you very much!!! It works fine! There was a dummy mistake in a FOR loop 🙂
Thank's for fast and helpful answers!
03-13-2008 09:22 PM
03-13-2008 09:31 PM
03-14-2008 02:29 AM - edited 03-14-2008 02:30 AM
Could it be that uChar is not a string at all but really just a single character???
@bi wrote:
Hello! You advised me to use MoveBlock function.. but it doesnt work. In my C source code I have mmaped memory using function "mmap" it returns a pointer of type (unsigned char *). Then I set char (or uChar) (tried both): char vertiba = ptr_to_pci_mem[1] And I want see data on indicator. Tried different types of indicators, even string indicator. Tried using MoveBlock function and nothing. Please help me with this question, where am I wrong? what should be done for realizing this task? #Code: ...... ......
MgErr CINRun(uChar String);
MgErr CINRun(uChar String)
{
...... ...... unsigned char *ptr_to_pci_mem;
#define PCI_MEM_LEN 2097152
ptr_to_pci_mem = mmap(NULL, PCI_MEM_LEN, PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t)pci_mem_addr); MoveBlock(&ptr_to_pci_mem[1], &String, 2);
...... ......
Waiting for your wise advices and answers.
03-14-2008 06:06 AM
03-14-2008 06:09 AM
03-14-2008 08:39 AM - edited 03-14-2008 08:40 AM
Sorry your two previous messages are lengthy but absolutley not clear to me. An attachment with the C code and VI would be probably worth about 1000 words of explanation.
@bi wrote:
And forgot about one more questiong: If my C program creates a file with output log, and I modify it for CIN (and for LabView there will be only returning Numeric = 32) will this C code doing his work? or I should modify the Whole C code - using only CIN functions? (for writing file for example).
03-17-2008 07:08 AM - edited 03-17-2008 07:10 AM