08-10-2017 09:01 AM
hi
i am beginner in CVI
i need to read from my power sensor the pulse of power so i download the driver and i configure it in the IDE this is my code :
#include <utility.h>
#include <userint.h>
#include "interface.h"
#include <cvintwrk.h>
#include <ansi_c.h>
#include <cvirte.h>
int main (int argc, char *argv[])
{
int answer=0 ;
int byteread;
int bytewritten;
int handle;
char buffer_reader[5000]="";
do
{
InetPing ("192.168.8.1", &answer, 1000);
printf("%d\n",answer);
} while (answer!=1);
handle=InetTelnetOpen ("192.168.8.1", 23, 0) ;
InetTelnetRead (handle, buffer_reader, 4000, &byteread, 1000);
printf("%s",buffer_reader);
InetTelnetWrite (handle, "wl down", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl mimo_preamble 0", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl phy_percal 3", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl phy_watchdog 0", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl interference 0", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl phy_percal 3", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl tempsense_disable 1", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl mimo_bw_cap 1", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl up", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl down", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl band b", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl up", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl chanspec -c 1 -b 2 -w 20 -s 0", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl mimo_txbw 2", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl txchain 3", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl down", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl rxchain 0x2", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl up", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl txchain 0x2", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl nrate -m 7", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl ssid """, "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl phy_txpwrctrl 1", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl txpwr1 -o -q 56", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl plcphdr auto", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl phy_forcecal 1", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl pkteng_start aa.bb.cc.dd.ee.ff tx sync 50 100 250", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl pkteng_stop tx", "\r\n", -1, &bytewritten, 1000);
InetTelnetWrite (handle, "wl pkteng_start aa.bb.cc.dd.ee.ff tx 100 1000 0", "\r\n", -1, &bytewritten, 1000);
InetTelnetRead (handle, buffer_reader, 4000, &byteread, 1000);
printf("%s",buffer_reader);
getchar();
rsnrpz_meass_readMeasurement (, 1, 5000, ); //this is my function
}
after the ping and telnet i need to read the power but i didn't know how i can use it .can you help me .sorry about my poor english
Solved! Go to Solution.
08-11-2017 01:53 PM
Which power sensor and which driver are you using?
Does this driver come with LabWindows/CVI examples?
08-14-2017 02:12 AM
i have an instrument : power sensor NRP-Z11 R&S
yes and the driver come with Labwindows/CVI
08-14-2017 04:51 PM
Have you checked the drivers to see if they come with example code?