Jump to content

Data tables problem


Flex727

Recommended Posts

  • MVP 2023

I ran across an interesting problem today. While I was able to figure it out and correct it fairly easily, I think it points to an underlying problem with how VisiLogic is dealing with Data Tables. Here is what happened:

 

I have a project I was modifying for another use. In it I have a Data Table with 3 columns. Part of the project modification involved editing column 3 and adding a column 4. In another project I had already made a similar modification and had some logic to write data to the modified Data Table, so I copied the logic from the second project to the first after modifying the Data Table in the first, but the Write Row to Data Table function block reversed the last two items. I confirmed that the Data Table in both projects had the exact same name, exact same number of columns, each column had the exact same name, and each column was of the exact same data type, but no matter what I did, copying the function block inexplicably reversed the last two items (NAME and EVENT columns in the attached picture).

 

The problem turned out to be that when I edited the Data Tables in the two different projects, I went about it very slightly differently. When I inserted a column in one of them I did "Insert Before" and in the other I did "Insert After". That had the result that Visilogic identified them internally as reversed and thus reversed the columns in the Write Row function block. There is no external indication that VisiLogic is using some other method to identify columns other than the column name, but it does. In my opinion, this is poor programming practice - if VisiLogic is going to identify the columns by something other than the assigned column name, then it needs to be indicated and that is the indicator that should be selected in the Write Row function block (labeled "Destination (Cell)".

Link to comment
Share on other sites

  • MVP 2023

I see what happened - the file was too big, but it was only 50K. Any idea why I'm limited to a 11.04KB file size on uploads? Almost anything reduced to that size is unusable.

 

I can't upload the applications without going back and re-creating the whole event and I really don't have time for that. The main issue is that VisiLogic refers to Data Table column internally by something other than the name of the column and there is no indication that is the case when the programmer is working with VisiLogic. If a Data Table is edited such that columns get re-positioned, but everything looks identical to the user, some functions will not work as expected (such as copying the Write Row to Data Table function block from another program with a seemingly identical Data Table.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...