Rev 156 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 156 | Rev 157 | ||
|---|---|---|---|
| Line 159... | Line 159... | ||
| 159 | LPSTR lpszCmdLine, int nCmdShow) { |
159 | LPSTR lpszCmdLine, int nCmdShow) { |
| 160 | 160 | ||
| 161 | double ret; |
161 | double ret; |
| 162 | // double voltage; |
162 | // double voltage; |
| 163 | double vSet=0; |
163 | double vSet=0; |
| 164 | int ch= |
164 | int ch=200; |
| 165 | int iret; |
165 | int iret; |
| 166 |
|
166 | int i, j; |
| 167 | char cret[2000]; |
167 | char cret[2000]; |
| 168 | 168 | ||
| 169 | HSNMP crate1; |
169 | HSNMP crate1; |
| 170 | 170 | ||
| 171 | if (InitCVIRTE (hInstance, 0, 0) == 0) |
171 | if (InitCVIRTE (hInstance, 0, 0) == 0) |
| 172 | return -1; /* out of memory */ |
172 | return -1; /* out of memory */ |
| 173 | 173 | ||
| 174 | MPOD_Start(); |
174 | MPOD_Start(); |
| 175 |
|
175 | // MPOD_Open(0,"arich-mpod1.kek.jp"); |
| - | 176 | MPOD_Open(0,"f9mpod.ijs.si"); |
|
| 176 | crate1 = crateHsnmp[0]; |
177 | crate1 = crateHsnmp[0]; |
| 177 | 178 | ||
| 178 | printf("-----------------------------------------------------------------\n"); |
179 | printf("-----------------------------------------------------------------\n"); |
| 179 | 180 | /* |
|
| - | 181 | for (i=0;i<8;i++) { |
|
| - | 182 | setChannelSwitch(crate1, i, 0); |
|
| - | 183 | setOutputVoltage(crate1, i, 0.); |
|
| - | 184 | setChannelSwitch(crate1, 100+i, 0); |
|
| - | 185 | setOutputVoltage(crate1, 100+i, 0.); |
|
| - | 186 | } |
|
| - | 187 | */ |
|
| 180 | strcpy(cret, MPOD_GetString(0,"moduleDescription. |
188 | strcpy(cret, MPOD_GetString(0,"moduleDescription.ma2")); |
| 181 | printf("Module type: %s\n",cret); |
189 | printf("Module type: %s\n",cret); |
| 182 | 190 | ||
| 183 | iret=getMainSwitch(crate1); |
191 | iret=getMainSwitch(crate1); |
| 184 | printf("Main Switch = %i\n", iret); |
192 | printf("Main Switch = %i\n", iret); |
| 185 | 193 | ||
| Line 188... | Line 196... | ||
| 188 | printf("Module Number = %i\n", iret); |
196 | printf("Module Number = %i\n", iret); |
| 189 | 197 | ||
| 190 | iret=MPOD_GetIntCh(0,"fanNominalSpeed",0); |
198 | iret=MPOD_GetIntCh(0,"fanNominalSpeed",0); |
| 191 | printf("Fan nominal speed = %i\n", iret); |
199 | printf("Fan nominal speed = %i\n", iret); |
| 192 | 200 | ||
| 193 | ret=MPOD_GetDouble(0,"outputVoltage. |
201 | ret=MPOD_GetDouble(0,"outputVoltage.201"); |
| 194 | printf("Output Voltage = %f.\n", ret); |
202 | printf("Output Voltage = %f.\n", ret); |
| 195 | 203 | ||
| - | 204 | setOutputVoltage(crate1, ch, 9000.); |
|
| 196 | // vSet = getOutputVoltage(crate1, ch); |
205 | // vSet = getOutputVoltage(crate1, ch); |
| 197 | vSet = MPOD_GetDoubleCh(0, "outputVoltage", ch+1); |
206 | vSet = MPOD_GetDoubleCh(0, "outputVoltage", ch+1); |
| 198 | printf("Output Voltage %i = %f.\n", ch, vSet); |
207 | printf("Output Voltage %i = %f.\n", ch, vSet); |
| 199 | 208 | ||
| 200 | //Test Channel Status |
209 | //Test Channel Status |