For Loop

Ted Bort 7 years ago in IQANdesign updated by Jean-Marc Zanni 6 years ago 3

Does IQAN5 support For Loops? I have not found any reference to it in documentation but the IQAN5 Qcode editor autocompletes the word for and provides syntax help for the command:

for <variable> := <start> to <end>

However when I run my code in the simulator the channel with the for loop shows that it's in an Error state.

No, for loops are not supported. The Qcode parser had some experimental support that obviously made it into IQANdesign 5.00, but there are no support in the master modules for executing the for loop.


Too bad,  This is what is really missing in Iqan at this stage.

I was reflecting this morning on the future of the platform we use for our system.  We currently have 3 different type of hardware in each of our system.

Early on we used Iqan as the primary processor/Display in our systems and still do for smaller application for single drive systems.  The choice to introduced a new hardware was mainly because back then multi master was not supported and software maintenance was very difficult with a very weak compare functionality.  But also the lack of software functionality.  Qcode and Iqan 5.04 as well as the improvement in hardware capability with the new MD4 series system really made us wonder if Going to an all Iqan platform would be the option.  So far here are the key elements we are missing to make the move:

  • Lack of Higher end processing like the For/to/Next loop.  You can deal with it but you have to really write a lot of code to do it.  try to copy one array into another for example....  or the Do/Until...  We have very flexible configurations with multiple unit attached so being able to handle those in loops to process the info is critical.  Ability to use structured data
  • Manageability/traceability of the code.  Improvement in 5.04 are welcome. The compare function is still very weak and difficult to use.  correlating the text to the actual graphic takes hours or may be I do not know how to use it efficiently.  I would like to have the following: ability to filter what the Diff function search for for example I can careless that the source of the edit is different.     Relative change of position is also very not critical.  However Change in actual code or parameter value is what is important.  Better would be side by side compare of the Graphic representation.
  • Limitation in Canbus Function.   We mostly deal with Raw can because our subVendor use all kind of different format.  Support for CanOpen and  NMEA2000 would be great as long as they are compatible to use the same port. I read today that I can attached an 11 bit bus and a 29 Bit bus to a single port.  I did not know that, not sure when this was introduced.  But very good. This was one biggy.  To this day I use two different physical port attached to the same Canbus thus limiting the number of physical bus I can use.  But still have problem when Dealing with system sending the information in burst(faster than the scan rate). For most we can usually deal with it with the use of the page filter (NMEA Fast Packet) but we have cases where we need more than 2 bytes to filter and we get stuck.  data get lost.  So ability to catch an array of messages with the same CanId in a single Scan is key to our process. Any plan to upgrade to CAN FD?
  • Data Exchange in Multi master: as pointed out in many tread the Channel exchange method is Very safe but not very efficient.  So we are back to keeping a separate spreadsheet  and a lots of code to exchange data between master via Generic Canbus.  Which means one more set of cables.  It would be much easier if there was another type of data exchange using a protocol like the Fast packet to broadcast data.  Implementation would be easier if the definition of the packet was global and shareable by all masters. 
  • Ethernet Based Multi master system support.  Currently for our high end product,  we developed the Iqan application to be mostly a Display function.  We specifically designed it that every unit have exactly the same code so we only have one code to maintain.  We can have has many stations as we want.  2 is typical, 3 exist.  The non Iqan Master has been designed to handle up to 5 but easily upgradeable to as many as we need by just changing one parameter (use of the For/To/Next and Structured data).  For maintenance we connect all the unit to a Simple Ethernet Router and with a Wifi connection I can access the unit through a local based License and remote software.  The G11 could be a better option for remote maintenance.  However, our configuration exclude the use of a multimaster system because the code is machine ID specific  and to install a G11 on a single Diagnostic Bus would require different machine ID with or at least this is my understanding.   So Remote access via the Ethernet port would be so much easier.  As far I I understand IQanConnect this only work through the G11 interface correct?