I've been trying to create a set of super blocks using Electrical blocks & even with a very simple circuit, Xcos throws the error "The number of equations doesn't match the number of variables".
My circuit consists of a 3 phase supply connected to a 3 phase load. In the form below, it works just fine. No errors whatsoever. Note that I haven't even added the scope blocks yet.
However, the moment I move those resistors to a superblock,
I start getting the following error -
Here's the link to the Zcos file
Could someone please throw some light on what's going on here?
Related
I'm curious as to whether there is a way of reporting the turtle which causes a runtime error?
I have a model which includes many agents and will run fine for hours, however sometimes a runtime error will occur. I have tried a few different things to fix it but always seems like an error occurs to the point I can't spare the time to fix it due to deadlines.
As the occurrence is so rare the easiest solution is to just write in the command center ask turtle X [die] after which I click GO and the problem is 'fixed'.
However I was wondering if anyone knew of a way to kill the turtle producing the error automatically every time a runtime error occurred to save me entering this manually.
I'm quite new to working with Arduino/GSM and have had problems getting basic HTTP functionality working. I am currently facing multiple problems - one being that the 3G shield I am working with (SIMCOM SIM5216A) does not seem to want to connect to a carrier! :(
However, the problem I would like to focus on for this question is that Phone Functionality - designated through the AT+CFUN command - does not seem to be maintained through power cycles. Additionally, sometimes after modifying the CFUN, the modem will run a soft reset.
Here is the command I have been using to modify the phone functionality of the modem:
AT+CFUN=1,0
I am under the impression that the second parameter should stop it from running a soft reset.
I have attempted to save the AT configuration by following advice in this question's accepted answer - here is the output from power on:
START
+STIN: 25
+STIN: 25
+CPIN: READY
SMS DONE
PB DONE
AT+CFUN=1,0
OK
AT&W
OK
However, whenever I next reset, I will get the following:
AT+CFUN?
+CFUN: 4
OK
So, my question is how can I save the CFUN configuration to be consistent between power cycles? (If you happen to be able to offer advice on why I can see medium-strength signal but cannot connect to an operator network, any advice would be welcome there too, however that is not the focus of this question)
With thanks,
BadDevH.
Exactly what that is saved with AT&W is a rather muddled, see this answer for details. However, regardless of that, the AT+CFUN command is controlling such a dynamic behaviour that I cannot imagine any manufacturer ever that has saved this with &W. Think more of CFUN more like setting a fixed cruise control speed while driving a car. There is no way the car will continue with the speed from last time when started.
For normal phones the default behaviour is value 1 - full functionality - because that is the very core functionality of what they do1, but for a GSM module shield, I am guessing that the default behaviour is set to no radio in order to save power, so it stays off until you need it at which point you need to explicitly turn it on.
1
And even in the case of no sim card present, it shall still be able to make emergency calls.
I've been writing a LabVIEW program to drive 3 axis Newport SMC-100 stepper motor controller for horizontal, vertical and rotational movement. I've implemented a for loop that repeatedly perform .3 degree turn followed by 5 separate horizontal movement until it turns a full circle. The program always fails at tellcontrollerstatus.vi, and gives me VISA 1073807339 timeout error. When I restart the program, it'll tell me there is no RS-232 connection available. The weird thing is, it happens at various loop iteration.
I'm sure the COM port setting is correct. If it's a simple program that tells the rotational stage to make a full turn in 1000 steps, it doesn't have any problem. It's only when I try to control two axes in each loop that I have problem.
I tried implementing delay using flat sequence but it doesn't really help. Eventually, I gave up changing the program and just tried another USB-RS-232 adapter cable. Then the problem is gone.
Although the problem was solved, it's not based on good diagnostic procedure and seems to be sheer luck. I'd like to know if there is a proper way to diagnose this kind of problem?
I always use addrcom to diagnose port.
http://www.ontrak.net/adrcom.htm
Also, you can short circuit pin 2 with 3 on DB9 and see weather do you receive the same data you have sent over COM. If you do so it means that your USB-RS-232 adapter cable working properly.
I'm trying to decipher messages from my smokedetectors to be able to get them connected to the system that controls the rest of the house. I've tried to decode the message myself, but from what I expected to find I cannot seem make out the different parts of information in the code.
I think I've found the bit that indicates an alarm from the smoke detector. But on the radio there is a number, which is also part of the serial number, so I expected to find this number in the transmission, but I've tried all combinations but cannot find a match. Not sure if this is even in there, but I would expect it to be used as an address for the smoke detector.
Is there some experts in this that could help me translate this the attached bit-stream just so I can check if I'm even on the right track on the decoding.
The clock signal is not available. But based on articles I've found on this subject online I'm assuming the clock-period is the same as one "long" pulse on the picture.
I have a DirectShow webcam application. I make use of Sample Grabber to get the buffer callbacks and IVideoWindow to control the display co-ordinates for the Preview. I have Preview and Capture Streams which I run as below.
g_pBuild->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video,cam,g_pGrabberF,pNullRenderer2); g_pBuild->RenderStream(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video,cam,NULL,NULL);
On certain On board cameras, IMediaControl::Run followed by IMediaControl::Stop followed by IMediaCOntrol::Run doesn't switch on the camera.
Extenal USB cameras work properly here. How can I diagnose more on this? Any pointers, please help.
Maybe its specific to a certain hardware issue in the unit.
Do a quick test by adding sleep of 1 sec between calls.
If it does help than you need to find a way to know when to unit state in idle or not.
There are two important parts of the question which you did not provide:
Filter graph topologies
HRESULTs of the method calls
A problem you might be having is that one of the filters in the topology does not handle well state transitions and fails somewhere between states. Supposedly your second Run meets it still trying to complete Stop. You might get a HRESULT there which indicates the issue (better for you) or the filter fails silently.
The filter graph's is the unlikely source of the bug itself. Chances are high that it does everything flawlessly, however since internally it distributes the calls between filters, one of the filter is letting you down.